]> granicus.if.org Git - postgresql/blob - src/makefiles/Makefile.aix
a9ba100305c4dda7988dcb4f5075fe24b93c17da
[postgresql] / src / makefiles / Makefile.aix
1 # MAKE_EXPORTS is required for svr4 loaders that want a file of
2 # symbol names to tell them what to export/import.
3 MAKE_EXPORTS= true
4
5 RANLIB= touch
6 MK_NO_LORDER= true
7 AROPT = crs
8
9 DLSUFFIX = .so
10 ifneq ($(GCC), yes)
11   ifeq ($(host_os), aix3.2.5)
12     LDFLAGS_SL = -e _nostart
13   endif
14   ifneq (,$(findstring aix4.1, $(host_os)))
15     LDFLAGS_SL = -bnoentry
16   endif
17 endif
18
19
20 EXPSUFF= .exp
21 IMPSUFF= .imp
22
23 POSTGRES_IMP= postgres$(IMPSUFF)
24
25 MKLDEXPORT=$(top_srcdir)/src/backend/port/aix/mkldexport.sh
26
27 $(POSTGRES_IMP):
28         @echo Making $@
29 ifeq ($(host_os), aix3.2.5)
30         $(MKLDEXPORT) postgres $(bindir) > $@
31 else
32   ifneq (,$(findstring aix4.1, $(host_os)))
33         $(MKLDEXPORT) postgres $(bindir) > $@
34   else
35         $(MKLDEXPORT) postgres . > $@
36   endif
37 endif
38         $(CC) -Wl,-bE:$(top_builddir)/src/backend/$@ -o postgres $(OBJS) $(LDFLAGS) $(LIBS)
39
40 %$(EXPSUFF): %.o
41         $(MKLDEXPORT) $*.o > $*$(EXPSUFF)
42
43 %$(DLSUFFIX): %.o %$(EXPSUFF)
44         @echo Making shared library $@ from $*.o, $*$(EXPSUFF) and postgres.imp
45         $(CC) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(LIBS) $(LDFLAGS_SL)