diff options
Diffstat (limited to 'src/makefiles')
| -rw-r--r-- | src/makefiles/Makefile.aix | 13 | ||||
| -rw-r--r-- | src/makefiles/Makefile.beos | 6 | ||||
| -rw-r--r-- | src/makefiles/Makefile.bsdi | 18 | ||||
| -rw-r--r-- | src/makefiles/Makefile.dgux | 4 | ||||
| -rw-r--r-- | src/makefiles/Makefile.freebsd | 6 | ||||
| -rw-r--r-- | src/makefiles/Makefile.hpux | 9 | ||||
| -rw-r--r-- | src/makefiles/Makefile.irix5 | 5 | ||||
| -rw-r--r-- | src/makefiles/Makefile.linux | 4 | ||||
| -rw-r--r-- | src/makefiles/Makefile.netbsd | 6 | ||||
| -rw-r--r-- | src/makefiles/Makefile.openbsd | 6 | ||||
| -rw-r--r-- | src/makefiles/Makefile.osf | 8 | ||||
| -rw-r--r-- | src/makefiles/Makefile.qnx4 | 6 | ||||
| -rw-r--r-- | src/makefiles/Makefile.sco | 4 | ||||
| -rw-r--r-- | src/makefiles/Makefile.solaris | 11 | ||||
| -rw-r--r-- | src/makefiles/Makefile.sunos4 | 9 | ||||
| -rw-r--r-- | src/makefiles/Makefile.svr4 | 4 | ||||
| -rw-r--r-- | src/makefiles/Makefile.ultrix4 | 6 | ||||
| -rw-r--r-- | src/makefiles/Makefile.univel | 5 | ||||
| -rw-r--r-- | src/makefiles/Makefile.unixware | 4 | ||||
| -rw-r--r-- | src/makefiles/Makefile.win | 9 |
20 files changed, 126 insertions, 17 deletions
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix index 46bf9dfdab..bb9c8f255c 100644 --- a/src/makefiles/Makefile.aix +++ b/src/makefiles/Makefile.aix @@ -4,6 +4,19 @@ MAKE_EXPORTS= true RANLIB= touch MK_NO_LORDER= true +AROPT = crs + +DLSUFFIX = .so +ifneq ($(GCC), yes) + ifeq ($(host_os), aix3.2.5) + CFLAGS_SL = -e _nostart + endif + ifeq ($(host_os), aix4.1) + CFLAGS_SL = -bnoentry + endif +endif +CFLAGS_SL += -lc + EXPSUFF= .exp IMPSUFF= .imp diff --git a/src/makefiles/Makefile.beos b/src/makefiles/Makefile.beos index dd171c5355..fa26c99354 100644 --- a/src/makefiles/Makefile.beos +++ b/src/makefiles/Makefile.beos @@ -1,7 +1,13 @@ MK_NO_LORDER=true +AROPT = crs + ifdef ELF_SYSTEM export_dynamic = -Wl,-E endif + +DLSUFFIX = .so +CFLAGS_SL = -fpic -DPIC + %.so: %.o ln -fs $(top_srcdir)/src/backend/postgres _APP_ $(CC) -nostart -Xlinker -soname=$@ -o $@ _APP_ $< diff --git a/src/makefiles/Makefile.bsdi b/src/makefiles/Makefile.bsdi index a990758f6d..b83db6f67a 100644 --- a/src/makefiles/Makefile.bsdi +++ b/src/makefiles/Makefile.bsdi @@ -1,8 +1,22 @@ -# for bsdi 4.0 ELF -# if we defined .so in template/bsdi_4.0 +AROPT = cq + +# bsdi 4.0 and later is ELF +DLSUFFIX = .so +ifeq ($(host_os), bsdi2.0) +DLSUFFIX = .o +endif +ifeq ($(host_os), bsdi2.1) +DLSUFFIX = .o +endif +ifeq ($(findstring bsdi3, $(host_os)), bsdi3) +DLSUFFIX = .o +endif ifeq ($(DLSUFFIX), .so) +CFLAGS_SL = -fpic export_dynamic = -export-dynamic +else +CFLAGS_SL = endif %.so: %.o diff --git a/src/makefiles/Makefile.dgux b/src/makefiles/Makefile.dgux index 21a43c0f15..c88ee14e0e 100644 --- a/src/makefiles/Makefile.dgux +++ b/src/makefiles/Makefile.dgux @@ -1,2 +1,6 @@ +AROPT = crs +DLSUFFIX = .so +CFLAGS_SL = -fpic + %.so: %.o $(CC) -shared -o $@ $< diff --git a/src/makefiles/Makefile.freebsd b/src/makefiles/Makefile.freebsd index cb73676c6c..56bb93e809 100644 --- a/src/makefiles/Makefile.freebsd +++ b/src/makefiles/Makefile.freebsd @@ -1,7 +1,12 @@ +AROPT = cq + ifdef ELF_SYSTEM export_dynamic = -export-dynamic endif +DLSUFFIX = .so +CFLAGS_SL = -fpic -DPIC + %.so: %.o ifdef ELF_SYSTEM $(LD) -x -shared -o $@ $< @@ -14,4 +19,3 @@ else @rm -f $@ $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic endif - diff --git a/src/makefiles/Makefile.hpux b/src/makefiles/Makefile.hpux index d93501e5d5..17b3a98c0d 100644 --- a/src/makefiles/Makefile.hpux +++ b/src/makefiles/Makefile.hpux @@ -26,6 +26,15 @@ endif LDFLAGS+= -Wl,+b -Wl,$(libdir) -Wl,-z export_dynamic = -Wl,-E +AROPT = crs + +DLSUFFIX = .sl +ifeq ($(GCC), yes) +CFLAGS_SL = -fPIC +else +CFLAGS_SL = +z +endif + # Rule for building shared libs (currently used only for regression test # shlib ... should go away, since this is not really enough knowledge) %.sl: %.o diff --git a/src/makefiles/Makefile.irix5 b/src/makefiles/Makefile.irix5 index fcc72602e7..cc018523bf 100644 --- a/src/makefiles/Makefile.irix5 +++ b/src/makefiles/Makefile.irix5 @@ -1,7 +1,10 @@ - # RANLIB is not used on IRIX 5 RANLIB= touch MK_NO_LORDER= true +AROPT = crs + +DLSUFFIX = .so +CFLAGS_SL = %.so: %.o $(LD) -G -Bdynamic -shared -o $@ $< diff --git a/src/makefiles/Makefile.linux b/src/makefiles/Makefile.linux index d7f20ea86b..268beb05aa 100644 --- a/src/makefiles/Makefile.linux +++ b/src/makefiles/Makefile.linux @@ -1,5 +1,7 @@ +AROPT = crs export_dynamic = -export-dynamic -MK_NO_LORDER= true +DLSUFFIX = .so +CFLAGS_SL = -fpic %.so: %.o $(CC) -shared -o $@ $< diff --git a/src/makefiles/Makefile.netbsd b/src/makefiles/Makefile.netbsd index ef9fbbee64..79684ecfc1 100644 --- a/src/makefiles/Makefile.netbsd +++ b/src/makefiles/Makefile.netbsd @@ -1,6 +1,12 @@ +AROPT = cq + ifdef ELF_SYSTEM export_dynamic = -Wl,-E endif + +DLSUFFIX = .so +CFLAGS_SL = -fpic -DPIC + %.so: %.o ifdef ELF_SYSTEM $(LD) -x -Bshareable -o $@ $< diff --git a/src/makefiles/Makefile.openbsd b/src/makefiles/Makefile.openbsd index ef9fbbee64..79684ecfc1 100644 --- a/src/makefiles/Makefile.openbsd +++ b/src/makefiles/Makefile.openbsd @@ -1,6 +1,12 @@ +AROPT = cq + ifdef ELF_SYSTEM export_dynamic = -Wl,-E endif + +DLSUFFIX = .so +CFLAGS_SL = -fpic -DPIC + %.so: %.o ifdef ELF_SYSTEM $(LD) -x -Bshareable -o $@ $< diff --git a/src/makefiles/Makefile.osf b/src/makefiles/Makefile.osf index a9e8e948ec..23156edc9d 100644 --- a/src/makefiles/Makefile.osf +++ b/src/makefiles/Makefile.osf @@ -1,2 +1,8 @@ -%.so: %.o +AROPT = crs +DLSUFFIX = .so +CFLAGS_SL = + +%.so: %.o $(LD) -shared -expect_unresolved '*' -o $@ $< + +LDFLAGS += -rpath $(libdir) diff --git a/src/makefiles/Makefile.qnx4 b/src/makefiles/Makefile.qnx4 index 4921bffd2e..e9cfbce3ea 100644 --- a/src/makefiles/Makefile.qnx4 +++ b/src/makefiles/Makefile.qnx4 @@ -1,11 +1,15 @@ MK_NO_LORDER= true CXXFLAGS+= -I/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++ AR= ar +AROPT = cr LD= $(AR) LDREL= $(AROPT) LDOUT= LIBS= -lunix LDFLAGS= $(LIBS) +DLSUFFIX = .so +CFLAGS_SL = + %$(DLSUFFIX): %.o - @echo Cannot make shared library $@ from $*.o + @echo 'cannot make shared object $@ from $<' diff --git a/src/makefiles/Makefile.sco b/src/makefiles/Makefile.sco index 0cc90f9fd9..a68f92e625 100644 --- a/src/makefiles/Makefile.sco +++ b/src/makefiles/Makefile.sco @@ -1,5 +1,9 @@ override CFLAGS += -dy export_dynamic = -W l,-Bexport +AROPT = cq + +DLSUFFIX = .so +CFLAGS_SL = -K PIC %.so: %.o $(LD) -G -Bdynamic -o $@ $< diff --git a/src/makefiles/Makefile.solaris b/src/makefiles/Makefile.solaris index 19ef50188b..8c08f79e03 100644 --- a/src/makefiles/Makefile.solaris +++ b/src/makefiles/Makefile.solaris @@ -1,8 +1,17 @@ -# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.2 2000/10/20 23:57:34 petere Exp $ +# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.3 2000/10/21 22:36:13 petere Exp $ + +AROPT = crs ifeq ($(with_gnu_ld), yes) export_dynamic = -Wl,-E endif +DLSUFFIX = .so +ifeq ($(GCC), yes) +CFLAGS_SL = -fPIC +else +CFLAGS_SL = -KPIC +endif + %.so: %.o $(LD) -G -Bdynamic -o $@ $< diff --git a/src/makefiles/Makefile.sunos4 b/src/makefiles/Makefile.sunos4 index 3bcdf0806c..0b8542b4f2 100644 --- a/src/makefiles/Makefile.sunos4 +++ b/src/makefiles/Makefile.sunos4 @@ -1,2 +1,11 @@ +AROPT = cr + +DLSUFFIX = .so +ifeq ($(GCC), yes) +CFLAGS_SL = -fPIC +else +CFLAGS_SL = -PIC +endif + %.so: %.o $(LD) -dc -dp -Bdynamic -o $@ $< diff --git a/src/makefiles/Makefile.svr4 b/src/makefiles/Makefile.svr4 index 21e1d7207d..dd1fdec4fa 100644 --- a/src/makefiles/Makefile.svr4 +++ b/src/makefiles/Makefile.svr4 @@ -4,6 +4,8 @@ LDFLAGS+= -lc /usr/ucblib/libucb.a -LD-Blargedynsym +DLSUFFIX = .so +CFLAGS_SL = + %.so: %.o $(LD) -G -Bdynamic -o $@ $< - diff --git a/src/makefiles/Makefile.ultrix4 b/src/makefiles/Makefile.ultrix4 index d71b474a24..09e37b7d27 100644 --- a/src/makefiles/Makefile.ultrix4 +++ b/src/makefiles/Makefile.ultrix4 @@ -1,7 +1,9 @@ SHELL=/bin/sh5 +AROPT = crs -# +DLSUFFIX = .so # "-G 0" works for both DEC cc and GNU cc. -# +CFLAGS_SL = -G 0 + %.so: %.c $(CC) -c -G 0 $(CPPFLAGS) $(CFLAGS) -o $@ $< diff --git a/src/makefiles/Makefile.univel b/src/makefiles/Makefile.univel index 1fc4ee65d8..f91cf357e7 100644 --- a/src/makefiles/Makefile.univel +++ b/src/makefiles/Makefile.univel @@ -1,8 +1,9 @@ -LDFLAGS+= -lc89 +AROPT = crs export_dynamic = -Wl,-Bexport +DLSUFFIX = .so +CFLAGS_SL = -K PIC %.so: %.o $(LD) -G -Bdynamic -o $@ $< INSTALL= /usr/ucb/install - diff --git a/src/makefiles/Makefile.unixware b/src/makefiles/Makefile.unixware index 51ca500bb1..f91cf357e7 100644 --- a/src/makefiles/Makefile.unixware +++ b/src/makefiles/Makefile.unixware @@ -1,7 +1,9 @@ +AROPT = crs export_dynamic = -Wl,-Bexport +DLSUFFIX = .so +CFLAGS_SL = -K PIC %.so: %.o $(LD) -G -Bdynamic -o $@ $< INSTALL= /usr/ucb/install - diff --git a/src/makefiles/Makefile.win b/src/makefiles/Makefile.win index 02456dff98..bcc01c747a 100644 --- a/src/makefiles/Makefile.win +++ b/src/makefiles/Makefile.win @@ -1,4 +1,4 @@ -# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.6 2000/10/20 21:04:13 petere Exp $ +# $Header: /cvsroot/pgsql/src/makefiles/Attic/Makefile.win,v 1.7 2000/10/21 22:36:13 petere Exp $ LDFLAGS+= -g DLLTOOL= dlltool DLLWRAP= dllwrap @@ -11,12 +11,15 @@ SHLIB_LINK=$(DLLLIBS) # (see http://sources.redhat.com/cygwin/faq/faq.html#SEC110) LIBS:=$(filter-out -lm -lc, $(LIBS)) +AROPT = crs +DLSUFFIX = .dll +CFLAGS_SL = + %.dll: %.o $(DLLTOOL) --export-all --output-def $*.def $< $(DLLWRAP) -o $@ --def $*.def $< $(top_builddir)/src/utils/dllinit.o $(DLLLIBS) rm -f $*.def -curdir:=$(shell pwd) -ifeq ($(findstring backend,$(curdir)), backend) +ifeq ($(findstring backend,$(subdir)), backend) override CPPFLAGS+= -DBUILDING_DLL=1 endif |
