1# Using X/Open Networking Interfaces requires to link with libxnet. 2# Without specifying this, bind(), getpeername() and so on don't work 3# correctly in the LP64 data model. 4LIBS := -lxnet $(LIBS) 5 6# Set up rpath so that the executables don't need SHLIB_PATH to be set. 7# (Note: --disable-rpath is a really bad idea on this platform...) 8ifeq ($(with_gnu_ld), yes) 9 rpath = -Wl,-rpath -Wl,'$(rpathdir)' 10else 11 rpath = -Wl,+b -Wl,'$(rpathdir)' 12endif 13 14# catch null pointer dereferences 15ifeq ($(with_gnu_ld), yes) 16# XXX what to put here? 17else 18 LDFLAGS_EX += -Wl,-z 19endif 20 21# set up appropriate options for shared library builds 22export_dynamic = -Wl,-E 23 24INSTALL_SHLIB_OPTS = -m 555 25 26AROPT = crs 27 28ifeq ($(host_cpu), ia64) 29 DLSUFFIX = .so 30else 31 DLSUFFIX = .sl 32endif 33 34# env var name to use in place of LD_LIBRARY_PATH 35ld_library_path_var = SHLIB_PATH 36 37# Rule for building a shared library from a single .o file 38%$(DLSUFFIX): %.o 39ifeq ($(GCC), yes) 40 ifeq ($(with_gnu_ld), yes) 41 $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ `$(CC) $(LDFLAGS) -print-libgcc-file-name` 42 else 43 $(LD) -b -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name` 44 endif 45else 46 ifeq ($(with_gnu_ld), yes) 47 $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ 48 else 49 $(LD) -b -o $@ $< 50 endif 51endif 52 53sqlmansect = 5 54