~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/makefiles/Makefile.hpux

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# HP-UX 10 has a select() in libcurses, so we need to get the libc version,
 
2
# which we do by linking -lc before -lcurses.  (Unfortunately we can't
 
3
# just not use libcurses.)  This also ensures that we get the POSIX signal
 
4
# routines in libc, not the BSD-like ones in libBSD.
 
5
LIBS := -lc $(LIBS)
 
6
 
 
7
# On the other hand, if we don't have POSIX signals, we need to use the
 
8
# libBSD signal routines.  (HPUX 9 and early HPUX 10 releases don't have
 
9
# POSIX signals.)  Make sure libBSD comes before libc in that case.
 
10
ifeq ($(HAVE_POSIX_SIGNALS), no)
 
11
   LIBS := -lBSD $(LIBS)
 
12
endif
 
13
 
 
14
# Using X/Open Networking Interfaces requires to link with libxnet.
 
15
# Without specifying this, bind(), getpeername() and so on don't work
 
16
# correctly in the LP64 data model.
 
17
LIBS := -lxnet $(LIBS)
 
18
 
 
19
# Set up rpath so that the executables don't need SHLIB_PATH to be set.
 
20
# (Note: --disable-rpath is a really bad idea on this platform...)
 
21
ifeq ($(with_gnu_ld), yes)
 
22
   rpath = -Wl,-rpath -Wl,$(rpathdir)
 
23
else
 
24
   rpath = -Wl,+b -Wl,$(rpathdir)
 
25
endif
 
26
 
 
27
# catch null pointer dereferences
 
28
ifeq ($(with_gnu_ld), yes)
 
29
# XXX what to put here?
 
30
else
 
31
   LDFLAGS += -Wl,-z
 
32
endif
 
33
 
 
34
# set up appropriate options for shared library builds
 
35
export_dynamic = -Wl,-E
 
36
 
 
37
INSTALL_SHLIB_OPTS = -m 555
 
38
 
 
39
AROPT = crs
 
40
 
 
41
ifeq ($(host_cpu), ia64)
 
42
   DLSUFFIX = .so
 
43
else
 
44
   DLSUFFIX = .sl
 
45
endif
 
46
ifeq ($(GCC), yes)
 
47
   CFLAGS_SL = -fpic
 
48
else
 
49
   CFLAGS_SL = +z
 
50
endif
 
51
 
 
52
# Rule for building shared libs (currently used only for regression test
 
53
# shlib ... should go away, since this is not really enough knowledge)
 
54
%$(DLSUFFIX): %.o
 
55
ifeq ($(GCC), yes)
 
56
  ifeq ($(with_gnu_ld), yes)
 
57
        $(CC) $(LDFLAGS) -shared -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
 
58
  else
 
59
        $(LD) -b -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
 
60
  endif
 
61
else
 
62
  ifeq ($(with_gnu_ld), yes)
 
63
        $(CC) $(LDFLAGS) -shared -o $@ $<
 
64
  else
 
65
        $(LD) -b -o $@ $<
 
66
  endif
 
67
endif
 
68
 
 
69
sqlmansect = 5