summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-11-01 22:28:42 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-11-01 22:28:42 +0000
commitb17a1a1826fb25707ab1d2b4c739a31a0ac3f6a4 (patch)
tree2e161334e0ece9d617340b2e005a071d570ded55 /bin
parentcc78e40172589a2154f9f74c5ff4461b93db14fd (diff)
merge the AIX and AIX64 cases
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mklib52
1 files changed, 13 insertions, 39 deletions
diff --git a/bin/mklib b/bin/mklib
index 7973be8f0c..858feda07f 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -199,7 +199,7 @@ case $ARCH in
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
# finish up
FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
- rm -f exptmp
+# rm -f exptmp
fi
;;
@@ -356,53 +356,27 @@ case $ARCH in
fi
;;
- 'AIX')
- if [ $STATIC = 1 ] ; then
- LIBNAME="lib${LIBNAME}.a"
- echo "mklib: Making AIX static library: " ${LIBNAME}
- ar -ruv ${LIBNAME} ${OBJECTS}
- FINAL_LIBS=${LIBNAME}
- else
- EXPFILE="lib${LIBNAME}.exp"
- OFILE=shr.o #Want to be consistent with the IBM libGL.a
- LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
- OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry"
- rm -f ${EXPFILE} ${OFILE}
- NM="/bin/nm -eC"
- echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
- ${NM} ${OBJECTS} | awk '{
- if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
- && ( substr($1,1,1) != ".")) {
- if (substr ($1, 1, 7) != "__sinit" &&
- substr ($1, 1, 7) != "__sterm") {
- if (substr ($1, 1, 5) == "__tf1")
- print (substr ($1, 7))
- else if (substr ($1, 1, 5) == "__tf9")
- print (substr ($1, 15))
- else
- print $1
- }
- }
- }' | sort -u >> ${EXPFILE}
- cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
- ar -r ${LIBNAME} ${OFILE}
- FINAL_LIBS="${LIBNAME}"
- fi
- ;;
+ 'AIX' | 'AIX64')
+ if [ $ARCH = "AIX64" ] ; then
+ X64="-X64"
+ fi
- 'AIX64')
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making AIX static library: " ${LIBNAME}
- ar -X64 -ruv ${LIBNAME} ${OBJECTS}
+ ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
else
EXPFILE="lib${LIBNAME}.exp"
OFILE=shr.o #Want to be consistent with the IBM libGL.a
LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
- OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64"
+ if [ $ARCH = "AIX64" ] ; then
+ OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64"
+ else
+ OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry"
+ fi
rm -f ${EXPFILE} ${OFILE}
- NM="/bin/nm -eC -X64"
+ NM="/bin/nm -eC ${X64}"
echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
${NM} ${OBJECTS} | awk '{
if ((($2 == "T") || ($2 == "D") || ($2 == "B")) \
@@ -419,7 +393,7 @@ case $ARCH in
}
}' | sort -u >> ${EXPFILE}
cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
- ar -X64 -r ${LIBNAME} ${OFILE}
+ ar ${X64} -r ${LIBNAME} ${OFILE}
FINAL_LIBS="${LIBNAME}"
fi
;;