77#
88#
99# IDENTIFICATION
10- # $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.63 1996/11/12 11:41:27 bryanh Exp $
10+ # $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.64 1996/11/13 08:36:31 bryanh Exp $
1111#
1212# NOTES
13- # This is seen by any Makefiles that include mk/postgres.mk. To
13+ # Essentially all Postgres make files include this file and use the
14+ # variables it sets. To
1415# override the default setting, create a Makefile.custom in this
1516# directory and put your defines there. (Makefile.custom is included
1617# near the end of this file.)
1718#
1819# If you change any of these defines you probably have to
19- #gmake clean;gmake
20- # since nodependecies are created for these. (of course you can
20+ # make clean;make
21+ # since nodependencies are created for these. (of course you can
2122# be crafty and check what files really depend on them and just remake
2223# those).
2324#
@@ -321,8 +322,15 @@ else
321322 AROPT = crs
322323endif
323324
325+ ##############################################################################
326+ #
327+ # Shared libraries.
328+ # This is overridden for many PORTNAMEs below.
329+
330+ SLSUFF= .so
331+
324332#----------------------------------------------------------------------
325- ifeq ($PORTNAME, BSD44_derived)
333+ ifeq ($( PORTNAME) , BSD44_derived)
326334MK_PORT= BSD44_derived
327335
328336# cc is gcc, but never mind about that...
@@ -335,15 +343,8 @@ RANLIB=/usr/bin/ranlib
335343LEX= flex
336344LDADD+= -L/usr/local/lib -lfl
337345
338- #
339- # for postgres.user.mk
340- #
341346CFLAGS_SL= -fpic -DPIC
342347
343- ifneq ($(HOSTTYPE), mips)
344- SLSUFF=.so
345- endif
346-
347348%.so: %.o
348349$(LD) -x -r -o $<.obj $<
349350@echo building shared object $@
@@ -363,10 +364,6 @@ MK_PORT= aix
363364# might want to try installbsd instead
364365INSTALL= /usr/ucb/install
365366
366- #
367- # for postgres.mk
368- #
369-
370367# the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
371368LDADD_BE= -lm -lbsd
372369
@@ -385,11 +382,7 @@ MAKE_EXPORTS= true
385382CFLAGS_BE+= -qchars=signed -qmaxmem=4000 -DHAVE_ANSI_CPP
386383
387384
388- #
389- # for postgres.user.mk
390- #
391385EXPSUFF= .exp
392- SLSUFF=.so
393386
394387MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
395388
@@ -407,9 +400,6 @@ endif
407400
408401ifeq ($(PORTNAME), alpha)
409402MK_PORT= alpha
410- #
411- # for postgres.mk
412- #
413403CFLAGS_BE+= -DUSE_POSIX_SIGNALS
414404
415405# NOFIXADE disallows unaligned access.
@@ -427,11 +417,6 @@ endif
427417# use the regex library
428418USE_REGEX= 1
429419
430- #
431- # for postgres.user.mk
432- #
433- SLSUFF= .so
434-
435420%.so: %.o
436421$(LD) -shared -expect_unresolved '*' -o $@ $<
437422
@@ -472,29 +457,17 @@ else
472457 LDADD_BE= -ldld -lcompat
473458endif
474459
475- #
476- # for postgres.user.mk
477- #
478- SLSUFF= .o
479-
480460endif
481461
482462#--------------------------------------------------------------------------
483463
484464ifeq ($(PORTNAME), dgux)
485465MK_PORT= linux
486466
487- SLSUFF=.so
488- #LDFLAGS+= -rdynamic
489-
490-
491467CFLAGS_SL= -fpic
492468%.so: %.o
493469$(CC) -shared -o $@ $<
494470
495- #
496- # for postgres.mk
497- #
498471CC= gcc
499472
500473CFLAGS_BE= -D__USE_POSIX_SIGNALS -DUSE_POSIX_SIGNALS
@@ -512,9 +485,6 @@ endif
512485ifeq ($(PORTNAME), hpux)
513486MK_PORT= hpux
514487
515- #
516- # for postgres.mk
517- #
518488LDADD_BE= -lBSD
519489
520490ifdef ENFORCE_ALIGNMENT
@@ -547,9 +517,6 @@ INSTALL= bsdinst
547517# RANLIB is not used on HP-UX
548518RANLIB= touch
549519
550- #
551- # for postgres.user.mk
552- #
553520CFLAGS_SL= +z
554521SLSUFF= .sl
555522
@@ -569,9 +536,6 @@ MK_PORT= i386_solaris
569536# cc won't work!
570537CC= gcc
571538
572- #
573- # for postgres.mk
574- #
575539CFLAGS_BE+= -DUSE_POSIX_SIGNALS
576540
577541# RANLIB is not used on solaris
@@ -589,17 +553,12 @@ LDADD_BE+= -lsocket -lnsl
589553
590554LD_ADD+= $(LDADD_BE)
591555
592- #
593- # for postgres.user.mk
594- #
595556ifeq ($(CC), cc)
596557CFLAGS_SL= -K PIC
597558else
598559CFLAGS_SL= -fPIC
599560endif
600561
601- SLSUFF=.so
602-
603562%.so: %.o
604563$(LD) -G -Bdynamic -o $@ $<
605564
@@ -615,9 +574,6 @@ MK_PORT= irix5
615574
616575CC= cc
617576
618- #
619- # for postgres.mk
620- #
621577CFLAGS_BE+= -DUSE_POSIX_SIGNALS
622578
623579# RANLIB is not used on IRIX 5
@@ -637,8 +593,6 @@ CFLAGS_BE+= -DSYSV_DIRENT
637593
638594LD_ADD+= $(LDADD_BE)
639595
640- SLSUFF= .so
641-
642596%.so: %.o
643597$(LD) -G -Bdynamic -o $@ $<
644598
@@ -663,17 +617,10 @@ MK_NO_LORDER= true
663617# use the regex library
664618USE_REGEX= 1
665619
666- #
667- # for postgres.user.mk
668- #
669620CFLAGS_SL= -fpic
670621%.so: %.o
671622$(CC) -shared -o $@ $<
672623
673- #
674- # for postgres.mk
675- #
676-
677624# The Linux gnulib #defines the problem away for you and calls
678625# the BSD routines if you give it the right flags.
679626CFLAGS_BE= -D__USE_BSD -D__USE_BSD_SIGNAL
@@ -694,17 +641,12 @@ CC= gcc
694641INSTALL= /usr/bin/install
695642RANLIB= /usr/bin/ranlib
696643
697- #
698- # for postgres.user.mk
699- #
700644ifeq ($(CC), cc)
701645CFLAGS_SL= -PIC
702646else
703647CFLAGS_SL= -fPIC
704648endif
705649
706- SLSUFF= .so
707-
708650%.so: %.o
709651$(LD) -dc -dp -Bdynamic -o $@ $<
710652endif
@@ -717,9 +659,6 @@ MK_PORT= sparc_solaris
717659# cc won't work!
718660CC= gcc
719661
720- #
721- # for postgres.mk
722- #
723662CFLAGS_BE+= -DUSE_POSIX_SIGNALS
724663
725664# RANLIB is not used on solaris
@@ -737,17 +676,12 @@ LDADD_BE+= -lsocket -lnsl
737676
738677LD_ADD+= $(LDADD_BE)
739678
740- #
741- # for postgres.user.mk
742- #
743679ifeq ($(CC), cc)
744680CFLAGS_SL= -K PIC
745681else
746682CFLAGS_SL= -fPIC
747683endif
748684
749- SLSUFF= .so
750-
751685%.so: %.o
752686$(LD) -G -Bdynamic -o $@ $<
753687
@@ -764,9 +698,6 @@ MK_PORT= svr4
764698CFLAGS+= -W0
765699YACC= bison -y
766700
767- #
768- # for postgres.mk
769- #
770701CFLAGS_BE+= -DUSE_POSIX_SIGNALS
771702
772703# MAKE_EXPORTS is required for svr4 loaders that want a file of
@@ -789,17 +720,12 @@ LDADD_BE+= -lsocket -lnsl -lc /usr/ucblib/libucb.a
789720
790721LD_ADD+= $(LDADD_BE)
791722
792- #
793- # for postgres.user.mk
794- #
795723ifeq ($(CC), cc)
796724#CFLAGS_SL= -K PIC
797725else
798726#CFLAGS_SL= -fPIC
799727endif
800728
801- SLSUFF= .so
802-
803729%.so: %.o
804730$(LD) -G -Bdynamic -o $@ $<
805731
@@ -812,9 +738,6 @@ endif
812738ifeq ($(PORTNAME), ultrix4)
813739MK_PORT= ultrix4
814740
815- #
816- # for postgres.mk
817- #
818741ifdef ENFORCE_ALIGNMENT
819742CFLAGS_BE= -DNOFIXADE
820743endif
@@ -825,9 +748,6 @@ NO_BEFOREINSTL= true
825748INSTALL= /usr/bin/install
826749RANLIB= /usr/bin/ranlib
827750
828- #
829- # for postgres.user.mk
830- #
831751CFLAGS_SL= -G 0
832752SLSUFF= .o
833753