]> granicus.if.org Git - postgresql/blob - src/makefiles/Makefile.netbsd
Don't zero opfuncid when reading nodes.
[postgresql] / src / makefiles / Makefile.netbsd
1 AROPT = cr
2
3 ifdef ELF_SYSTEM
4 export_dynamic = -Wl,-E
5 rpath = -Wl,-R'$(rpathdir)'
6 else
7 rpath = -Wl,-R'$(rpathdir)'
8 endif
9
10 DLSUFFIX = .so
11
12 ifeq ($(findstring sparc,$(host_cpu)), sparc)
13 CFLAGS_SL = -fPIC -DPIC
14 else
15 CFLAGS_SL = -fpic -DPIC
16 endif
17
18
19 # Rule for building a shared library from a single .o file
20 %.so: %.o
21 ifdef ELF_SYSTEM
22         $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ $<
23 else
24         $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
25         @echo building shared object $@
26         @rm -f $@.pic
27         @${AR} cq $@.pic $<.obj
28         ${RANLIB} $@.pic
29         @rm -f $@
30         $(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
31 endif