Makefile.hpux 1.88 KB
Newer Older
1 2 3 4
# HP-UX 10 has a select() in libcurses, so we need to get the libc version,
# which we do by linking -lc before -lcurses.  (Unfortunately we can't
# just not use libcurses.)  This also ensures that we get the POSIX signal
# routines in libc, not the BSD-like ones in libBSD.
5
LIBS := -lc $(LIBS)
6

7 8 9
# On the other hand, if we don't have POSIX signals, we need to use the
# libBSD signal routines.  (HPUX 9 and early HPUX 10 releases don't have
# POSIX signals.)  Make sure libBSD comes before libc in that case.
10
ifeq ($(HAVE_POSIX_SIGNALS), no)
11
   LIBS := -lBSD $(LIBS)
12 13
endif

14 15 16 17 18
# Using X/Open Networking Interfaces requires to link with libxnet.
# Without specifying this, bind(), getpeername() and so on don't work
# correctly in the LP64 data model.
LIBS := -lxnet $(LIBS)

19 20
# Set up rpath so that the executables don't need SHLIB_PATH to be set.
# (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 29 30 31 32
ifeq ($(with_gnu_ld), yes)
# XXX what to put here?
else
   LDFLAGS += -Wl,-z
endif
33

34
# set up appropriate options for shared library builds
35
export_dynamic = -Wl,-E
36
shlib_symbolic = -Bsymbolic
37

38 39
INSTALL_SHLIB_OPTS = -m 555

40 41
AROPT = crs

42 43 44 45 46
ifeq ($(host_cpu), ia64)
   DLSUFFIX = .so
else
   DLSUFFIX = .sl
endif
47
ifeq ($(GCC), yes)
48
   CFLAGS_SL = -fpic
49
else
50
   CFLAGS_SL = +z
51 52
endif

53 54
# Rule for building shared libs (currently used only for regression test
# shlib ... should go away, since this is not really enough knowledge)
55
%$(DLSUFFIX): %.o
56 57 58 59 60 61
ifeq ($(GCC), yes)
  ifeq ($(with_gnu_ld), yes)
	$(CC) $(LDFLAGS) -shared -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
  else
	$(LD) -b -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
  endif
62
else
63 64 65
  ifeq ($(with_gnu_ld), yes)
	$(CC) $(LDFLAGS) -shared -o $@ $<
  else
66
	$(LD) -b -o $@ $<
67
  endif
68
endif
69 70

sqlmansect = 5