7
7
#
8
8
#
9
9
# IDENTIFICATION
10
- # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.4 1997/01/24 03:19:48 scrappy Exp $
10
+ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.5 1997/01/24 03:57:14 scrappy Exp $
11
11
#
12
12
# NOTES
13
13
# Essentially all Postgres make files include this file and use the
@@ -197,7 +197,7 @@ TK_LIB= -ltk4.1
197
197
198
198
X11_INCDIR= /usr/include
199
199
X11_LIBDIR= /usr/lib
200
- X11_LIB= -lX11 -lsocket -lnsl
200
+ X11_LIB= -lX11 @SOCKET_LIB@ @NSL_LIB@
201
201
202
202
##############################################################################
203
203
#
@@ -284,15 +284,13 @@ CC= @CC@
284
284
# LEX
285
285
#
286
286
LEX= @LEX@
287
- LD_ADD_BE = @LEXLIB@
287
+
288
+ LDADD_BE= @MATH_LIB@ @DL_LIB@ @LEXLIB@ @SOCKET_LIB@ @NSL_LIB@
288
289
289
290
#----------------------------------------------------------------------
290
291
ifeq ($(PORTNAME), BSD44_derived)
291
292
# cc is gcc, but never mind about that...
292
293
293
- INSTALL= /usr/bin/install
294
- RANLIB= /usr/bin/ranlib
295
-
296
294
# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
297
295
298
296
CFLAGS_SL= -fpic -DPIC
@@ -311,11 +309,9 @@ endif
311
309
#--------------------------------------------------------------------------
312
310
313
311
ifeq ($(PORTNAME), aix)
314
- # might want to try installbsd instead
315
- INSTALL= /usr/ucb/install
316
312
317
313
# the -lm is because "pow" is defined in libbsd.a and we want pow(3m)
318
- LDADD_BE= -lm -lbsd -ll -lld
314
+ LDADD_BE+= -lbsd -ll -lld
319
315
320
316
# MAKE_EXPORTS is required for svr4 loaders that want a file of
321
317
# symbol names to tell them what to export/import.
@@ -348,7 +344,7 @@ $(POSTGRES_EXP):
348
344
@echo Making share library $@ from $*.o, $*$(EXPSUFF), and postgres.exp
349
345
$(LD) -H512 -T512 -o $@ -e _nostart \
350
346
-bI:$(POSTGRES_EXP) -bE:$*$(EXPSUFF) \
351
- $*.o -lm -lc 2>/dev/null
347
+ $*.o @MATH_LIB@ -lc 2>/dev/null
352
348
endif
353
349
354
350
#---------------------------------------------------------------------------
@@ -365,7 +361,7 @@ CFLAGS_BE= -DNOFIXADE
365
361
else
366
362
CFLAGS_BE= -DNOPRINTADE
367
363
endif
368
- LDADD_BE= -lln
364
+ LDADD_BE+ = -lln
369
365
370
366
# use the regex library
371
367
USE_REGEX= 1
@@ -393,7 +389,7 @@ endif
393
389
ifeq ($(PRE_BSDI_2_1), false)
394
390
# cc is gcc v1.42
395
391
# gcc is gcc v2.7.2
396
- LDADD_BE= -ltermcap -ldl
392
+ LDADD_BE+ = -ltermcap
397
393
ifeq ($(shell uname -r), 2.1)
398
394
LDADD_BE+= -lipc
399
395
endif
403
399
# use the regex library
404
400
USE_REGEX= 1
405
401
CFLAGS_BE= -DPRE_BSDI_2_1
406
- LDADD_BE= -ldld -lcompat -lipc
402
+ LDADD_BE+ = -ldld -lcompat -lipc
407
403
endif
408
404
409
405
DLSUFFIX= .o
@@ -417,12 +413,8 @@ CFLAGS_SL= -fpic
417
413
%.so: %.o
418
414
$(CC) -shared -o $@ $<
419
415
420
- LDADD_BE= -ldl
421
-
422
416
YACC= bison -y
423
417
424
- INSTALL=/usr/bin/X11/bsdinst
425
-
426
418
endif
427
419
428
420
#----------------------------------------------------------------------------
@@ -431,7 +423,7 @@ ifeq ($(PORTNAME), hpux)
431
423
# -W l,-E export symbols for linking with the shared libraries
432
424
# dynamic loader
433
425
434
- LDADD_BE= -lBSD -ll
426
+ LDADD_BE+ = -lBSD -ll
435
427
ifeq $(CC), cc)
436
428
CFLAGS_BE= -W l,-E
437
429
LDFLAGS_BE= -W l,-E
@@ -465,12 +457,6 @@ ifeq ($(CC), cc)
465
457
CFLAGS_BE+= -Ae
466
458
endif
467
459
468
- # This is a script from the MIT X11 distribution.
469
- INSTALL= bsdinst
470
-
471
- # RANLIB is not used on HP-UX
472
- RANLIB= touch
473
-
474
460
CFLAGS_SL= +z
475
461
DLSUFFIX= .sl
476
462
@@ -487,21 +473,14 @@ endif
487
473
ifeq ($(PORTNAME), i386_solaris)
488
474
# cc won't work!
489
475
490
- # RANLIB is not used on solaris
491
- RANLIB= touch
492
-
493
- INSTALL= /usr/ucb/install
494
-
495
- #
496
- # Random things that must be passed everywhere to enable
497
- # everything to compile. :-/
498
- #
499
- # The extra -I flag is to scoop up extra BSD-emulating headers.
476
+ #
477
+ # Random things that must be passed everywhere to enable
478
+ # everything to compile. :-/
479
+ #
480
+ # The extra -I flag is to scoop up extra BSD-emulating headers.
500
481
# This needs to be fixed. Things other than the backend should not be
501
- # accessing headers in the backend directory.
502
- CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
503
- LDADD_BE= -lsocket -lnsl -ll -ldl
504
- LD_ADD= -lsocket -lnsl
482
+ # accessing headers in the backend directory.
483
+ CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
505
484
506
485
ifeq ($(CC), cc)
507
486
CFLAGS_SL= -K PIC
@@ -520,23 +499,11 @@ endif
520
499
#----------------------------------------------------------------------------
521
500
522
501
ifeq ($(PORTNAME), irix5)
523
- LDADD_BE= -ll
502
+ LDADD_BE+ = -ll
524
503
525
504
# RANLIB is not used on IRIX 5
526
505
RANLIB= touch
527
506
528
- #If you have GNU install, by all means set CUSTOM_INSTALL to that in
529
- #Makefile.custom. If you read the man page for /usr/bin/X11/bsdinst,
530
- #you will see it is not intended for end user use. It chowns the files
531
- #it installs to root.
532
- INSTALL= /usr/bin/X11/bsdinst
533
-
534
- IPCSDIR= /usr/sbin
535
-
536
- INSTLOPTS= -m 444
537
- INSTL_EXE_OPTS= -m 555
538
- INSTL_LIB_OPTS= -m 664
539
-
540
507
%.so: %.o
541
508
$(LD) -G -Bdynamic -o $@ $< $(LD_ADD)
542
509
@@ -550,10 +517,9 @@ endif
550
517
ifeq ($(PORTNAME), linux)
551
518
ifndef LINUX_ELF
552
519
DLSUFFIX= .o
553
- LDADD_BE= -ldld
520
+ LDADD_BE+ = -ldld
554
521
else
555
522
DLSUFFIX= .so
556
- LDADD_BE= -ldl
557
523
LDFLAGS_BE= -rdynamic
558
524
endif
559
525
MK_NO_LORDER= true
@@ -574,17 +540,13 @@ endif
574
540
#---------------------------------------------------------------------------
575
541
576
542
ifeq ($(PORTNAME), sunos4)
577
- # cc won't work!
578
-
579
- INSTALL= /usr/bin/install
580
- RANLIB= /usr/bin/ranlib
581
543
582
544
ifeq ($(CC), cc)
583
545
CFLAGS_SL= -PIC
584
546
else
585
547
CFLAGS_SL= -fPIC
586
548
endif
587
- LDADD_BE= -lln -ldl
549
+ LDADD_BE+ = -lln
588
550
589
551
%.so: %.o
590
552
$(LD) -dc -dp -Bdynamic -o $@ $<
@@ -593,23 +555,12 @@ endif
593
555
#----------------------------------------------------------------------------
594
556
595
557
ifeq ($(PORTNAME), sparc_solaris)
596
- # cc won't work!
597
-
598
- LDADD_BE= -lsocket -lnsl -ll -ldl
599
- LD_ADD= -lsocket -lnsl
600
-
601
- # RANLIB is not used on solaris
602
- RANLIB= touch
603
-
604
- INSTALL= /usr/ucb/install
605
-
606
558
#
607
559
# Random things that must be passed everywhere to enable
608
560
# everything to compile. :-/
609
561
#
610
562
# The extra -I flag is to scoop up extra BSD-emulating headers.
611
563
CFLAGS_BE= -I$(SRCDIR)/backend/port/sparc_solaris
612
- LDADD_BE+= -lsocket -lnsl
613
564
614
565
ifeq ($(CC), cc)
615
566
CFLAGS_SL= -K PIC
@@ -635,19 +586,13 @@ YACC= bison -y
635
586
# symbol names to tell them what to export/import.
636
587
MAKE_EXPORTS= true
637
588
638
- # RANLIB is not used on svr4
639
- RANLIB= touch
640
-
641
- # GNU install
642
- INSTALL= /home/tools/bin/install
643
-
644
589
#
645
590
# Random things that must be passed everywhere to enable
646
591
# everything to compile. :-/
647
592
#
648
593
# The extra -I flag is to scoop up extra BSD-emulating headers.
649
594
CFLAGS_BE+= -I$(SRCDIR)/backend/port/svr4
650
- LDADD_BE= -lsocket -lnsl - lc /usr/ucblib/libucb.a -ll -ldl
595
+ LDADD_BE+ = -lc /usr/ucblib/libucb.a
651
596
LDFLAGS_BE= -LD-Blargedynsym
652
597
653
598
%.so: %.o
@@ -663,14 +608,11 @@ ifeq ($(PORTNAME), ultrix4)
663
608
ifdef ENFORCE_ALIGNMENT
664
609
CFLAGS_BE= -DNOFIXADE
665
610
endif
666
- LDADD_BE= -ldl -lln
611
+ LDADD_BE+= -lln
667
612
668
613
# install creates intermediate directories
669
614
NO_BEFOREINSTL= true
670
615
671
- INSTALL= /usr/bin/install
672
- RANLIB= /usr/bin/ranlib
673
-
674
616
CFLAGS_SL= -G 0
675
617
DLSUFFIX= .o
676
618
@@ -687,9 +629,7 @@ endif
687
629
#---------------------------------------------------------------------------
688
630
# All others need -lm
689
631
690
- ifneq ($(PORTNAME), nextstep)
691
- LD_ADD+= -lm
692
- endif
632
+ LD_ADD+= @MATH_LIB@
693
633
694
634
# This goes here so that customization in Makefile.custom is effective
695
635
##############################################################################
0 commit comments