From 1c4b7116c4841d08f24cb2853dae44a8051423fc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Oct 2003 17:58:38 +0000 Subject: Eric Plante's updates for OSMesa16. --- bin/mklib | 55 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 22 deletions(-) (limited to 'bin') 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') -- cgit v1.2.3