1998-11-29 06:30:25 +01:00
|
|
|
# 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.
|
2000-10-28 01:59:39 +02:00
|
|
|
LIBS := -lc $(LIBS)
|
1998-07-06 22:28:09 +02:00
|
|
|
|
1998-11-29 06:30:25 +01:00
|
|
|
# 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.
|
2000-06-11 13:40:09 +02:00
|
|
|
ifeq ($(HAVE_POSIX_SIGNALS), no)
|
2000-10-28 01:59:39 +02:00
|
|
|
LIBS := -lBSD $(LIBS)
|
1998-01-13 05:38:30 +01:00
|
|
|
endif
|
|
|
|
|
2004-09-03 01:06:43 +02:00
|
|
|
# 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)
|
|
|
|
|
2000-10-28 01:59:39 +02:00
|
|
|
# Embed 'libdir' as the shared library search path so that the executables
|
|
|
|
# don't need SHLIB_PATH to be set. (We do not observe the --enable-rpath
|
|
|
|
# switch here because you'd get rather bizarre behavior if you leave this
|
|
|
|
# option off.)
|
2004-09-03 01:06:43 +02:00
|
|
|
ifeq ($(with_gnu_ld), yes)
|
|
|
|
LDFLAGS += -Wl,-rpath -Wl,$(libdir)
|
|
|
|
else
|
|
|
|
LDFLAGS += -Wl,+b -Wl,$(libdir)
|
|
|
|
endif
|
2000-10-28 01:59:39 +02:00
|
|
|
|
|
|
|
# catch null pointer dereferences
|
2004-09-03 01:06:43 +02:00
|
|
|
ifeq ($(with_gnu_ld), yes)
|
|
|
|
# XXX what to put here?
|
|
|
|
else
|
|
|
|
LDFLAGS += -Wl,-z
|
|
|
|
endif
|
2000-10-28 01:59:39 +02:00
|
|
|
|
2001-03-14 20:35:12 +01:00
|
|
|
# set up appropriate options for shared library builds
|
2000-10-07 20:43:23 +02:00
|
|
|
export_dynamic = -Wl,-E
|
2001-03-14 20:35:12 +01:00
|
|
|
shlib_symbolic = -Bsymbolic
|
1999-01-17 01:18:59 +01:00
|
|
|
|
2001-03-10 11:38:59 +01:00
|
|
|
INSTALL_SHLIB_OPTS = -m 555
|
|
|
|
|
2000-10-22 00:36:14 +02:00
|
|
|
AROPT = crs
|
|
|
|
|
2004-09-03 01:06:43 +02:00
|
|
|
ifeq ($(host_cpu), ia64)
|
|
|
|
DLSUFFIX = .so
|
|
|
|
else
|
|
|
|
DLSUFFIX = .sl
|
|
|
|
endif
|
2000-10-22 00:36:14 +02:00
|
|
|
ifeq ($(GCC), yes)
|
2004-09-03 01:06:43 +02:00
|
|
|
CFLAGS_SL = -fpic
|
2000-10-22 00:36:14 +02:00
|
|
|
else
|
2004-09-03 01:06:43 +02:00
|
|
|
CFLAGS_SL = +z
|
2000-10-22 00:36:14 +02:00
|
|
|
endif
|
|
|
|
|
1999-01-17 01:18:59 +01:00
|
|
|
# Rule for building shared libs (currently used only for regression test
|
|
|
|
# shlib ... should go away, since this is not really enough knowledge)
|
2004-09-03 01:06:43 +02:00
|
|
|
%$(DLSUFFIX): %.o
|
|
|
|
ifeq ($(with_gnu_ld), yes)
|
|
|
|
$(CC) $(LDFLAGS) -shared -o $@ $<
|
|
|
|
else
|
1999-01-17 01:18:59 +01:00
|
|
|
$(LD) -b -o $@ $<
|
2004-09-03 01:06:43 +02:00
|
|
|
endif
|
2001-08-29 21:14:40 +02:00
|
|
|
|
|
|
|
sqlmansect = 5
|