## Makefile Template for Shared Libraries
##
-LINK = $(LTLINK) -version-info $(LIBVERSION)
+LTVERSION = -version-info $(LIBVERSION)
+LINK = $(LTLINK)
COMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c
MKDEPFLAG = -l
version_type=freebsd
library_names_spec='${libname}${release}.so.$versuffix $libname.so'
if [ -x `/usr/bin/objformat` ]; then
- finish_cmds='PATH="$PATH:/sbin" OBJFORMAT=`objformat` ldconfig -m $libdir'
+ OBJFORMAT=`/usr/bin/objformat`
+ finish_cmds='PATH="$PATH:/sbin" OBJFORMAT="$OBJFORMAT" ldconfig -m $libdir'
else
finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
fi
freebsd)
version_vars="$version_vars major versuffix"
major="$current"
- if [ $PORTOBJFORMAT = elf ]; then
- versuffix="$current";
+
+ if [ X"$OBJFORMAT" = X ]; then
+ if [ -x /usr/bin/objformat ]; then
+ OBJECTFORMAT=`objformat`
+ fi
+ fi
+
+ if [ "$OBJFORMAT" = elf ]; then
+ versuffix="$current";
else
- versuffix="$current.$revision";
+ versuffix="$current.$revision";
fi
;;
LIBTOOL = @LIBTOOL@
LIBVERSION = 1:0:0
-LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS)
+LTLINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LFLAGS) $(LTVERSION)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
# Misc UNIX commands used in makefiles