]> granicus.if.org Git - postgresql/blob - src/makefiles/Makefile.hpux
Define integer limits independently from the system definitions.
[postgresql] / src / makefiles / Makefile.hpux
1 # If we don't have POSIX signals, we need to use the libBSD signal routines.
2 # (HPUX 9 and early HPUX 10 releases don't have POSIX signals.)  Link in
3 # libBSD only in that case.
4 ifeq ($(HAVE_POSIX_SIGNALS), no)
5    LIBS := -lBSD $(LIBS)
6 endif
7
8 # Using X/Open Networking Interfaces requires to link with libxnet.
9 # Without specifying this, bind(), getpeername() and so on don't work
10 # correctly in the LP64 data model.
11 LIBS := -lxnet $(LIBS)
12
13 # Set up rpath so that the executables don't need SHLIB_PATH to be set.
14 # (Note: --disable-rpath is a really bad idea on this platform...)
15 ifeq ($(with_gnu_ld), yes)
16    rpath = -Wl,-rpath -Wl,'$(rpathdir)'
17 else
18    rpath = -Wl,+b -Wl,'$(rpathdir)'
19 endif
20
21 # catch null pointer dereferences
22 ifeq ($(with_gnu_ld), yes)
23 # XXX what to put here?
24 else
25    LDFLAGS_EX += -Wl,-z
26 endif
27
28 # set up appropriate options for shared library builds
29 export_dynamic = -Wl,-E
30
31 INSTALL_SHLIB_OPTS = -m 555
32
33 AROPT = crs
34
35 ifeq ($(host_cpu), ia64)
36    DLSUFFIX = .so
37 else
38    DLSUFFIX = .sl
39 endif
40 ifeq ($(GCC), yes)
41    CFLAGS_SL = -fPIC
42 else
43    CFLAGS_SL = +Z
44 endif
45
46 # Rule for building a shared library from a single .o file
47 %$(DLSUFFIX): %.o
48 ifeq ($(GCC), yes)
49   ifeq ($(with_gnu_ld), yes)
50         $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
51   else
52         $(LD) -b -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
53   endif
54 else
55   ifeq ($(with_gnu_ld), yes)
56         $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ $<
57   else
58         $(LD) -b -o $@ $<
59   endif
60 endif
61
62 sqlmansect = 5