Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fdc1cf2

Browse files
author
Bryan Henderson
committed
Make shared library builds work for BSD44_derived.
1 parent b269793 commit fdc1cf2

File tree

1 file changed

+13
-93
lines changed

1 file changed

+13
-93
lines changed

src/Makefile.global

+13-93
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@
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 no dependecies are created for these. (of course you can
20+
# make clean; make
21+
# since no dependencies 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
322323
endif
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)
326334
MK_PORT= BSD44_derived
327335

328336
# cc is gcc, but never mind about that...
@@ -335,15 +343,8 @@ RANLIB= /usr/bin/ranlib
335343
LEX= flex
336344
LDADD+= -L/usr/local/lib -lfl
337345

338-
#
339-
# for postgres.user.mk
340-
#
341346
CFLAGS_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
364365
INSTALL= /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)
371368
LDADD_BE= -lm -lbsd
372369

@@ -385,11 +382,7 @@ MAKE_EXPORTS= true
385382
CFLAGS_BE+= -qchars=signed -qmaxmem=4000 -DHAVE_ANSI_CPP
386383

387384

388-
#
389-
# for postgres.user.mk
390-
#
391385
EXPSUFF= .exp
392-
SLSUFF= .so
393386

394387
MKLDEXPORT=$(SRCDIR)/backend/port/aix/mkldexport.sh
395388

@@ -407,9 +400,6 @@ endif
407400

408401
ifeq ($(PORTNAME), alpha)
409402
MK_PORT= alpha
410-
#
411-
# for postgres.mk
412-
#
413403
CFLAGS_BE+= -DUSE_POSIX_SIGNALS
414404

415405
# NOFIXADE disallows unaligned access.
@@ -427,11 +417,6 @@ endif
427417
# use the regex library
428418
USE_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
473458
endif
474459

475-
#
476-
# for postgres.user.mk
477-
#
478-
SLSUFF= .o
479-
480460
endif
481461

482462
#--------------------------------------------------------------------------
483463

484464
ifeq ($(PORTNAME), dgux)
485465
MK_PORT= linux
486466

487-
SLSUFF= .so
488-
#LDFLAGS+= -rdynamic
489-
490-
491467
CFLAGS_SL= -fpic
492468
%.so: %.o
493469
$(CC) -shared -o $@ $<
494470

495-
#
496-
# for postgres.mk
497-
#
498471
CC= gcc
499472

500473
CFLAGS_BE= -D__USE_POSIX_SIGNALS -DUSE_POSIX_SIGNALS
@@ -512,9 +485,6 @@ endif
512485
ifeq ($(PORTNAME), hpux)
513486
MK_PORT= hpux
514487

515-
#
516-
# for postgres.mk
517-
#
518488
LDADD_BE= -lBSD
519489

520490
ifdef ENFORCE_ALIGNMENT
@@ -547,9 +517,6 @@ INSTALL= bsdinst
547517
# RANLIB is not used on HP-UX
548518
RANLIB= touch
549519

550-
#
551-
# for postgres.user.mk
552-
#
553520
CFLAGS_SL= +z
554521
SLSUFF= .sl
555522

@@ -569,9 +536,6 @@ MK_PORT= i386_solaris
569536
# cc won't work!
570537
CC= gcc
571538

572-
#
573-
# for postgres.mk
574-
#
575539
CFLAGS_BE+= -DUSE_POSIX_SIGNALS
576540

577541
# RANLIB is not used on solaris
@@ -589,17 +553,12 @@ LDADD_BE+= -lsocket -lnsl
589553

590554
LD_ADD+= $(LDADD_BE)
591555

592-
#
593-
# for postgres.user.mk
594-
#
595556
ifeq ($(CC), cc)
596557
CFLAGS_SL= -K PIC
597558
else
598559
CFLAGS_SL= -fPIC
599560
endif
600561

601-
SLSUFF= .so
602-
603562
%.so: %.o
604563
$(LD) -G -Bdynamic -o $@ $<
605564

@@ -615,9 +574,6 @@ MK_PORT= irix5
615574

616575
CC= cc
617576

618-
#
619-
# for postgres.mk
620-
#
621577
CFLAGS_BE+= -DUSE_POSIX_SIGNALS
622578

623579
# RANLIB is not used on IRIX 5
@@ -637,8 +593,6 @@ CFLAGS_BE+= -DSYSV_DIRENT
637593

638594
LD_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
664618
USE_REGEX= 1
665619

666-
#
667-
# for postgres.user.mk
668-
#
669620
CFLAGS_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.
679626
CFLAGS_BE= -D__USE_BSD -D__USE_BSD_SIGNAL
@@ -694,17 +641,12 @@ CC= gcc
694641
INSTALL= /usr/bin/install
695642
RANLIB= /usr/bin/ranlib
696643

697-
#
698-
# for postgres.user.mk
699-
#
700644
ifeq ($(CC), cc)
701645
CFLAGS_SL= -PIC
702646
else
703647
CFLAGS_SL= -fPIC
704648
endif
705649

706-
SLSUFF= .so
707-
708650
%.so: %.o
709651
$(LD) -dc -dp -Bdynamic -o $@ $<
710652
endif
@@ -717,9 +659,6 @@ MK_PORT= sparc_solaris
717659
# cc won't work!
718660
CC= gcc
719661

720-
#
721-
# for postgres.mk
722-
#
723662
CFLAGS_BE+= -DUSE_POSIX_SIGNALS
724663

725664
# RANLIB is not used on solaris
@@ -737,17 +676,12 @@ LDADD_BE+= -lsocket -lnsl
737676

738677
LD_ADD+= $(LDADD_BE)
739678

740-
#
741-
# for postgres.user.mk
742-
#
743679
ifeq ($(CC), cc)
744680
CFLAGS_SL= -K PIC
745681
else
746682
CFLAGS_SL= -fPIC
747683
endif
748684

749-
SLSUFF= .so
750-
751685
%.so: %.o
752686
$(LD) -G -Bdynamic -o $@ $<
753687

@@ -764,9 +698,6 @@ MK_PORT= svr4
764698
CFLAGS+= -W0
765699
YACC= bison -y
766700

767-
#
768-
# for postgres.mk
769-
#
770701
CFLAGS_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

790721
LD_ADD+= $(LDADD_BE)
791722

792-
#
793-
# for postgres.user.mk
794-
#
795723
ifeq ($(CC), cc)
796724
#CFLAGS_SL= -K PIC
797725
else
798726
#CFLAGS_SL= -fPIC
799727
endif
800728

801-
SLSUFF= .so
802-
803729
%.so: %.o
804730
$(LD) -G -Bdynamic -o $@ $<
805731

@@ -812,9 +738,6 @@ endif
812738
ifeq ($(PORTNAME), ultrix4)
813739
MK_PORT= ultrix4
814740

815-
#
816-
# for postgres.mk
817-
#
818741
ifdef ENFORCE_ALIGNMENT
819742
CFLAGS_BE= -DNOFIXADE
820743
endif
@@ -825,9 +748,6 @@ NO_BEFOREINSTL= true
825748
INSTALL= /usr/bin/install
826749
RANLIB= /usr/bin/ranlib
827750

828-
#
829-
# for postgres.user.mk
830-
#
831751
CFLAGS_SL= -G 0
832752
SLSUFF= .o
833753

0 commit comments

Comments
 (0)