blob: 4a231bda312e13664b5ec970c585342800093a2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#-------------------------------------------------------------------------
#
# postgres.mk.BSD44_derived--
# specific rules for OSs derived from 4.4-lite BSD
# e.g. NetBSD, FreeBSD and BSD/OS
#
# Copyright (c) 1994-5, Regents of the University of California
#
# $Id: postgres.mk.BSD44_derived,v 1.3 1996/10/11 03:56:41 scrappy Exp $
#
#-------------------------------------------------------------------------
ifndef MK_PORT
MK_PORT= BSD44_derived
# cc is gcc, but never mind about that...
CC= gcc
INSTALL= /usr/bin/install
RANLIB= /usr/bin/ranlib
AROPT = cq
# FreeBSD 2.1R with new Flex v2.5.2 in /usr/local
LEX = flex
LDADD+= -L/usr/local/lib -lfl
#
# for postgres.user.mk
#
CFLAGS_SL = -fpic -DPIC
ifeq ($(HOSTTYPE), mips)
#SLSUFF= .so
else
SLSUFF= .so
endif
%.so: %.o
$(LD) -x -r -o $(objdir)/$(<F).obj $(objdir)/$(<F)
@echo building shared object $(objdir)/$(@F)
@rm -f $(objdir)/$(@F).pic
@${AR} cq $(objdir)/$(@F).pic `lorder $(objdir)/$(<F).obj | tsort`
${RANLIB} $(objdir)/$(@F).pic
@rm -f $(objdir)/$(@F)
$(LD) -x -Bshareable -Bforcearchive \
-o $(objdir)/$(@F) $(objdir)/$(@F).pic
endif
|