diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2004-01-17 18:31:12 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2004-01-17 18:31:12 +0000 |
commit | 5b9a9d46d4a55a70cebbe238ac712631013b680b (patch) | |
tree | b3c12fa064c0e519f17ead2258b7496dd31fe56a | |
parent | 4eb16e3a6761cae2d51801f72836549a02687c1a (diff) |
tweak OpenBSD and SunOS commands
-rwxr-xr-x | bin/mklib | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -114,7 +114,7 @@ case $ARCH in LIBNAME="lib${LIBNAME}" # prefix with "lib" if [ $STATIC = 1 ] ; then - echo "mklib: Making Linux static library: " ${LIBNAME}.a + echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a LINK="ar" OPTS="-ruv" # make lib @@ -122,7 +122,11 @@ case $ARCH in # finish up FINAL_LIBS="${LIBNAME}.a" else - OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" + if [ $ARCH = 'Linux' ] ; then + OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" + else + OPTS="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" + fi VERSION="${MAJOR}.${MINOR}.${PATCH}" echo "mklib: Making " $ARCH " shared library: " ${LIBNAME}.so.${VERSION} @@ -190,9 +194,10 @@ case $ARCH in OPTS="-G" fi echo "mklib: linker is" ${LINK} ${OPTS} - rm -f ${LIBNAME} - ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS} - FINAL_LIBS=${LIBNAME} + rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} + ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} + ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} + FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" ;; 'FreeBSD') |