summaryrefslogtreecommitdiff
path: root/bin/mklib
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-11-24 12:01:39 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-11-24 12:01:39 +0000
commit027fdb8bbd73119a1c0ad09432f7ac24ff24517b (patch)
treefdf93e01e792f4761a2df8753ab47cfd0fa806b6 /bin/mklib
parent3a7c3b02a38ce4707effbd5ac1ca5c07a9d3e8a4 (diff)
Merge head into branchvtx-0-2-24112003vtx-0-2-branch
Diffstat (limited to 'bin/mklib')
-rwxr-xr-xbin/mklib66
1 files changed, 43 insertions, 23 deletions
diff --git a/bin/mklib b/bin/mklib
index b207ade5e1..3501d6529c 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')
@@ -302,6 +313,13 @@ case $ARCH in
FINAL_LIBS=${LIBNAME}
;;
+ 'MorphOS')
+ LIBNAME="lib${LIBNAME}.a"
+ echo "mklib: Making MorphOS library: " ${LIBNAME}
+ ppc-morphos-ar rc ${LIBNAME} ${OBJECTS}
+ FINAL_LIBS="${LIBNAME}"
+ ;;
+
'example')
# If you're adding support for a new architecture, you can
# start with this:
@@ -317,7 +335,9 @@ case $ARCH in
echo "mklib: WARNING: please update the bin/mklib script!"
# XXX this is a total hack for Mesa - remove someday
# fall-back to an old mklib.* script
- ${MAKELIB} "lib${LIBNAME}.a" ${MAJOR} ${MINOR} ${PATCH} ${OBJECTS}
+ LIBNAME="lib${LIBNAME}.a"
+ ${TOP}/${MAKELIB} "lib${LIBNAME}.a" ${MAJOR} ${MINOR} ${PATCH} ${OBJECTS}
+ FINAL_LIBS="${LIBNAME}"
;;
esac