]> granicus.if.org Git - postgresql/blob - src/makefiles/Makefile.freebsd
Cleanups for FreeBSD linking (PIC) and plpython compiles.
[postgresql] / src / makefiles / Makefile.freebsd
1 AROPT = cr
2
3 ifdef ELF_SYSTEM
4 export_dynamic = -Wl,-export-dynamic
5 rpath = -Wl,-R$(rpathdir)
6 endif
7
8 DLSUFFIX = .so
9
10 ifeq ($(findstring sparc,$(host_cpu)), sparc)
11 CFLAGS_SL = -fPIC -DPIC
12 else
13 CFLAGS_SL = -fPIC -DPIC
14 endif
15
16
17 %.so: %.o
18 ifdef ELF_SYSTEM
19         $(LD) -x -shared -o $@ $<
20 else
21         $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
22         @echo building shared object $@
23         @rm -f $@.pic
24         @${AR} cq $@.pic `lorder $<.obj | tsort`
25         ${RANLIB} $@.pic
26         @rm -f $@
27         $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
28 endif
29
30 sqlmansect = 7
31
32 allow_nonpic_in_shlib = yes