LINK_SO= \
( $(DEBUG); \
nm -Pg $$SHOBJECTS | grep ' [BDT] ' | cut -f1 -d' ' > lib$(LIBNAME).exp; \
- $$SHAREDCMD $(SHARED_LDFLAGS) $$SHAREDFLAGS -o $$SHLIB$$SHLIB_SOVER \
+ $$SHAREDCMD $(SHARED_LDFLAGS) $$SHAREDFLAGS -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
$$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS ) && \
$(SYMLINK_SO); ( $(DEBUG); rm -f lib$(LIBNAME).exp )
SYMLINK_SO= \
if [ -n "$$SHLIB_COMPAT"]; then \
- prev=$$SHLIB$$SHLIB_SOVER; \
+ prev=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
for x in $$SHLIB_COMPAT; do \
- ( $(DEBUG); rm -f $$SHLIB$$x; \
- ln -s $$prev $$SHLIB$$x ); \
- prev=$$SHLIB$$x; \
+ ( $(DEBUG); rm -f $$SHLIB$$x$$SHLIB_SUFFIX; \
+ ln -s $$prev $$SHLIB$$x$$SHLIB_SUFFIX ); \
+ prev=$$SHLIB$$x$$SHLIB_SUFFIX; \
done; \
fi
LINK_SO_A= SHOBJECTS="lib$(LIBNAME).a $(LIBEXTRAS)"; $(LINK_SO)
link_o.gnu:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
NOALLSYMSFLAGS='-Wl,--no-whole-archive' \
- SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER" \
+ SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
SHAREDCMD='$(CC)'; \
$(LINK_SO_O)
link_a.gnu:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-Wl,--whole-archive' \
NOALLSYMSFLAGS='-Wl,--no-whole-archive' \
- SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER" \
+ SHAREDFLAGS="-shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX" \
SHAREDCMD='$(CC)'; \
$(LINK_SO_A)
# For Darwin AKA Mac OS/X (dyld)
link_o.darwin:
@ $(CALC_VERSIONS); \
- SHLIB=lib$(LIBNAME).dylib \
+ SHLIB=lib$(LIBNAME) \
+ SHLIB_SUFFIX=.dylib \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-all_load' \
NOALLSYMSFLAGS='' \
link_a.darwin:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME)$$SHLIB_SOVER.dylib \
+ SHLIB_SUFFIX=.dylib \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-all_load' \
NOALLSYMSFLAGS='' \
link_o.cygwin:
@ SHLIB=cyg$(LIBNAME).dll \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_SOVER= \
ALLSYMSFLAGS='-Wl,--whole-archive' \
$(LINK_SO_O)
link_a.cygwin:
@ SHLIB=cyg$(LIBNAME).dll \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_SOVER= \
ALLSYMSFLAGS='-Wl,--whole-archive' \
LIBDEPS="$(LIBDEPS)" link_o.gnu; \
else \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
if [ -n "$$SHLIB_HIST" ]; then \
LIBDEPS="$(LIBDEPS)" link_o.gnu; \
else \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
if [ -n "$$SHLIB_HIST" ]; then \
LIBDEPS="$(LIBDEPS)" link_o.gnu; \
else \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
if [ -n "$$SHLIB_HIST" ]; then \
LIBDEPS="$(LIBDEPS)" link_o.gnu; \
else \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
if [ -n "$$SHLIB_HIST" ]; then \
LIBDEPS="$(LIBDEPS)" link_o.gnu; \
else \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
if [ -n "$$SHLIB_HIST" ]; then \
LIBDEPS="$(LIBDEPS)" link_o.gnu; \
else \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
SHLIB_HIST=`echo "$(LIBCOMPATVERSIONS)" | cut -d';' -f2 | sed -e 's/ */:/'`; \
if [ -n "$$SHLIB_HIST" ]; then \
else \
$(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-z allextract' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='$(CC)'; \
$(LINK_SO_O); \
fi
else \
$(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-z allextract' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='$(CC)'; \
$(LINK_SO_A); \
fi
else \
$(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-z allextract' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='$(CC)'; \
$(LINK_SO_O); \
fi
else \
$(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-z allextract' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-G -h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='$(CC)'; \
$(LINK_SO_A_UNPACKED); \
fi
else \
$(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-all' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='$(CC)'; \
$(LINK_SO_O); \
fi
else \
$(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-all' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='$(CC)'; \
$(LINK_SO_A); \
fi
link_o.hpux32:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).sl \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS) -lc" \
ALLSYMSFLAGS='-Fl' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='/usr/ccs/bin/ld'; \
- $(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER
+ $(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
link_a.hpux32:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).sl \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS) -lc" \
ALLSYMSFLAGS='-Fl' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='/usr/ccs/bin/ld'; \
- $(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER
+ $(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
# HP-UX includes the full pathname of libs we depend on, so we would get
# ./libcrypto (with ./ as path information) compiled into libssl, hence
link_o.hpux64:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).sl \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS) -lc" \
ALLSYMSFLAGS='+forceload' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='/usr/ccs/bin/ld'; \
- $(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER
+ $(LINK_SO_O) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
link_a.hpux64:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).sl \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS) -lc" \
ALLSYMSFLAGS='+forceload' \
NOALLSYMSFLAGS='' \
- SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER' \
+ SHAREDFLAGS='-b -z +h $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX' \
SHAREDCMD='/usr/ccs/bin/ld'; \
- $(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER
+ $(LINK_SO_A) && chmod a=rx $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX
link_o.aix:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-bnogc' \
NOALLSYMSFLAGS='' \
link_a.aix:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS='-bnogc' \
NOALLSYMSFLAGS='' \
link_o.reliantunix:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS= \
NOALLSYMSFLAGS='' \
link_a.reliantunix:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
+ SHLIB_SUFFIX= \
LIBDEPS="$(LIBDEPS)" \
ALLSYMSFLAGS= \
NOALLSYMSFLAGS='' \
$(LINK_SO_A_UNPACKED)
# Targets to build symbolic links when needed
-symlink.gnu symlink.darwin symlink.solaris symlink.svr3 symlink.irix \
+symlink.gnu symlink.solaris symlink.svr3 symlink.irix \
symlink.aix symlink.reliantunix:
@ $(CALC_VERSIONS); \
SHLIB=lib$(LIBNAME).so \
$(SYMLINK_SO)
+symlink.darwin:
+ @ $(CALC_VERSIONS); \
+ SHLIB=lib$(LIBNAME) \
+ SHLIB_SUFFIX=.dylib \
+ $(SYMLINK_SO)
symlink.cygwin symlib.alpha-osf1 symlink.tru64 symlink.tru64-rpath:
symlink.hpux32 symlink.hpux64:
@ $(CALC_VERSIONS); \