1# MAKE_EXPORTS is required for svr4 loaders that want a file of 2# symbol names to tell them what to export/import. 3MAKE_EXPORTS= true 4 5RANLIB= touch 6AROPT = crs 7 8# -blibpath must contain ALL directories where we should look for libraries 9libpath := $(shell echo $(subst -L,:,$(filter -L/%,$(LDFLAGS))) | sed -e's/ //g'):/usr/lib:/lib 10 11ifeq ($(host_os), aix3.2.5) 12 rpath = -L'$(rpathdir)' 13else 14 rpath = -Wl,-blibpath:'$(rpathdir)$(libpath)' 15endif 16 17DLSUFFIX = .so 18ifeq ($(host_os), aix3.2.5) 19ifneq ($(GCC), yes) 20 LDFLAGS_SL += -e _nostart -H512 -bM:SRE 21endif 22else 23 LDFLAGS_SL += -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE 24endif 25 26# env var name to use in place of LD_LIBRARY_PATH 27ld_library_path_var = LIBPATH 28 29 30POSTGRES_IMP= postgres.imp 31 32ifdef PGXS 33BE_DLLLIBS= -Wl,-bI:$(pkglibdir)/$(POSTGRES_IMP) 34else 35BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) 36endif 37 38MKLDEXPORT_DIR=src/backend/port/aix 39MKLDEXPORT=$(top_srcdir)/$(MKLDEXPORT_DIR)/mkldexport.sh 40 41%.exp: %.o 42 $(MKLDEXPORT) $^ >$@ 43 44# Rule for building a shared library from a single .o file 45%$(DLSUFFIX): %.o %.exp 46 $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bE:$*.exp $(BE_DLLLIBS) 47