summaryrefslogtreecommitdiffstats
path: root/bin/mklib
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-10-10 17:58:38 +0000
committerBrian Paul <[email protected]>2003-10-10 17:58:38 +0000
commit1c4b7116c4841d08f24cb2853dae44a8051423fc (patch)
tree4a692864fa94a10b8d457bf3c8bc75f4ca7c1e7c /bin/mklib
parentfaa2b090126928f098db6f2126c8b3336ee56364 (diff)
Eric Plante's updates for OSMesa16.
Diffstat (limited to 'bin/mklib')
-rwxr-xr-xbin/mklib55
1 files changed, 33 insertions, 22 deletions
diff --git a/bin/mklib b/bin/mklib
index b207ade5e13..a0d6115f2ef 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -110,29 +110,40 @@ case $ARCH in
'Linux')
LIBNAME="lib${LIBNAME}" # prefix with "lib"
- OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
- VERSION="${MAJOR}.${MINOR}.${PATCH}"
- echo "mklib: Making Linux shared library: " ${LIBNAME}.so.${VERSION}
-
- if [ $CPLUSPLUS = 1 ] ; then
- LINK="g++"
- else
- LINK="gcc"
- fi
-
- # rm any old libs
- rm -f ${LIBNAME}.so.${VERSION}
- rm -f ${LIBNAME}.so.${MAJOR}
- rm -f ${LIBNAME}.so
-
- # make lib
- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
- # make usual symlinks
- ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
- ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
- # finish up
- FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
+ if [ $STATIC = 1 ] ; then
+ echo "mklib: Making Linux static library: " ${LIBNAME}.a
+ LINK="ar"
+ OPTS="-ruv"
+ # make lib
+ ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
+ # finish up
+ FINAL_LIBS="${LIBNAME}.a"
+ else
+ OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
+ VERSION="${MAJOR}.${MINOR}.${PATCH}"
+
+ echo "mklib: Making Linux shared library: " ${LIBNAME}.so.${VERSION}
+
+ if [ $CPLUSPLUS = 1 ] ; then
+ LINK="g++"
+ else
+ LINK="gcc"
+ fi
+
+ # rm any old libs
+ rm -f ${LIBNAME}.so.${VERSION}
+ rm -f ${LIBNAME}.so.${MAJOR}
+ rm -f ${LIBNAME}.so
+
+ # make lib
+ ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+ # make usual symlinks
+ ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
+ ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
+ # finish up
+ FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
+ fi
;;
'SunOS')