summaryrefslogtreecommitdiff
path: root/bin/mklib
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-01-10 22:12:21 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-01-10 22:12:21 +0000
commit12d6caea08e5840e7852573a1dcb34b4c6f16192 (patch)
tree8c2322d57a73c93c060a961cf6e2a452eb8976dc /bin/mklib
parentcf75101bba7b944b597f29adc3a7f83d85c0d4b1 (diff)
Use same steps for Linux and OpenBSD.
Added AIX/gcc support.
Diffstat (limited to 'bin/mklib')
-rwxr-xr-xbin/mklib31
1 files changed, 17 insertions, 14 deletions
diff --git a/bin/mklib b/bin/mklib
index 3dc4cd91c1..af413390d9 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -109,7 +109,8 @@ fi
#
case $ARCH in
- 'Linux')
+ 'Linux' | 'OpenBSD')
+ # GCC-based environment
LIBNAME="lib${LIBNAME}" # prefix with "lib"
if [ $STATIC = 1 ] ; then
@@ -124,7 +125,7 @@ case $ARCH in
OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
VERSION="${MAJOR}.${MINOR}.${PATCH}"
- echo "mklib: Making Linux shared library: " ${LIBNAME}.so.${VERSION}
+ echo "mklib: Making " $ARCH " shared library: " ${LIBNAME}.so.${VERSION}
if [ $CPLUSPLUS = 1 ] ; then
LINK="g++"
@@ -204,18 +205,6 @@ case $ARCH in
FINAL_LIBS="${SHLIB} ${STLIB}"
;;
- 'OpenBSD')
- LIBNAME="lib${LIBNAME}"
- VERSION="${MAJOR}.${MINOR}"
- echo "Building OpenBSD PIC library: " ${LIBNAME}
- rm -f ${LIBNAME}_pic.a ${LIBNAME}.so.${VERSION}
- ar cq ${LIBNAME}_pic.a ${OBJECTS}
- ranlib ${LIBNAME}_pic.a
- ld -x -Bshareable -Bforcearchive -o ${LIBNAME}.so.${VERSION} ${LIBNAME}_pic.a
- ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so
- FINAL_LIBS="${LIBNAME}_pic.a ${LIBNAME}.so.${VERSION} ${LIBNAME}.so"
- ;;
-
'NetBSD')
LIBNAME="lib${LIBNAME}"
echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME}
@@ -374,6 +363,20 @@ case $ARCH in
fi
;;
+ 'aix-gcc')
+ # AIX with gcc
+ LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
+ echo "mklib: Making AIX GCC shared library: " ${LIBNAME}
+ # remove old lib
+ rm -f ${LIBNAME}
+ # make the lib
+ gcc -shared -Wl,-G ${OBJECTS} ${DEPS} -o ${LIBNAME}
+
+ # NOTE: the application linking with this library must specify
+ # the -Wl,-brtl flags to gcc
+
+ FINAL_LIBS=${LIBNAME}
+ ;;
'example')
# If you're adding support for a new architecture, you can