summaryrefslogtreecommitdiff
path: root/src/makefiles/Makefile.aix
blob: 46bf9dfdabea2d71be951c39cdea84bd2c7a670f (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
# 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

EXPSUFF= .exp
IMPSUFF= .imp

POSTGRES_IMP= postgres$(IMPSUFF)

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

$(POSTGRES_IMP):
	@echo Making $@
	$(MKLDEXPORT) postgres $(bindir) > $@
	$(CC) -Wl,-bE:$(top_builddir)/src/backend/$@ -o postgres $(OBJS) $(LDFLAGS)

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

%$(DLSUFFIX): %.o %$(EXPSUFF)
	@echo Making shared library $@ from $*.o, $*$(EXPSUFF), and installed postgres.imp
	$(CC) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(libdir)/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(CFLAGS_SL)