summaryrefslogtreecommitdiff
path: root/src/makefiles/Makefile.aix
blob: 3b21a74c92b387bd84f7f89e811e407df65c842a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# MAKE_EXPORTS is required for svr4 loaders that want a file of
# symbol names to tell them what to export/import.
MAKE_EXPORTS= true

RANLIB= touch
MK_NO_LORDER= true
AROPT = crs

DLSUFFIX = .so
ifeq ($(host_os), aix3.2.5)
ifneq ($(GCC), yes)
	LDFLAGS_SL = -e _nostart -H512 -bM:SRE
endif
else
	LDFLAGS_SL = -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE
endif


EXPSUFF= .exp
IMPSUFF= .imp

POSTGRES_IMP= postgres$(IMPSUFF)

ifdef PGXS
BE_DLLLIBS= -Wl,-bI:$(DESTDIR)$(bindir)/postgres/$(POSTGRES_IMP)
else
BE_DLLLIBS= -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP)
endif

MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh

%$(EXPSUFF): %.o
	$(MKLDEXPORT) $*.o > $*$(EXPSUFF)

%$(DLSUFFIX): %.o %$(EXPSUFF)
	$(CC) $(LDFLAGS) $(LDFLAGS_SL) -o $@ $*.o -Wl,-bE:$*$(EXPSUFF) $(SHLIB_LINK)

sqlmansect = 7