OSDN Git Service

Modify the platform-specific makefiles so that macro 'rpath' is defined
[pg-rex/syncrep.git] / src / makefiles / Makefile.netbsd
1 AROPT = cr
2
3 ifdef ELF_SYSTEM
4 export_dynamic = -Wl,-E
5 rpath = -Wl,-R$(rpathdir)
6 shlib_symbolic = -Wl,-Bsymbolic -lc
7 else
8 rpath = -R$(rpathdir)
9 endif
10
11 DLSUFFIX = .so
12
13 ifeq ($(findstring sparc,$(host_cpu)), sparc)
14 CFLAGS_SL = -fPIC -DPIC
15 else
16 CFLAGS_SL = -fpic -DPIC
17 endif
18
19
20 %.so: %.o
21 ifdef ELF_SYSTEM
22         $(LD) -x -Bshareable -o $@ $<
23 else
24         $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
25         @echo building shared object $@
26         @rm -f $@.pic
27         @${AR} cq $@.pic `lorder $<.obj | tsort`
28         ${RANLIB} $@.pic
29         @rm -f $@
30         $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
31 endif
32
33 sqlmansect = 7