mirror of
https://github.com/postgres/postgres.git
synced 2026-04-26 00:31:07 -04:00
This was used in a time when a shared libperl or libpython was difficult to come by. That is obsolete, and the idea behind the flag was never fully portable anyway and will likely fail on more modern CPU architectures.
25 lines
489 B
Makefile
25 lines
489 B
Makefile
AROPT = cr
|
|
|
|
ifdef ELF_SYSTEM
|
|
export_dynamic = -Wl,-export-dynamic
|
|
rpath = -Wl,-R'$(rpathdir)'
|
|
endif
|
|
|
|
DLSUFFIX = .so
|
|
|
|
CFLAGS_SL = -fPIC -DPIC
|
|
|
|
|
|
# Rule for building a shared library from a single .o file
|
|
%.so: %.o
|
|
ifdef ELF_SYSTEM
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ $<
|
|
else
|
|
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
|
|
@echo building shared object $@
|
|
@rm -f $@.pic
|
|
@${AR} cq $@.pic $<.obj
|
|
${RANLIB} $@.pic
|
|
@rm -f $@
|
|
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
|
|
endif
|