summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-10-10 15:26:28 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-10-10 15:26:28 +0100
commit3a3801c1431203fc4dca24d56577995ae2e78956 (patch)
tree7ec341b78ecc62dc1a238392aff828c363148d69 /bin
parentd7f1cb5b5a134b63227d5746a2dd1f05597c5c2f (diff)
parent7216679c1998b49ff5b08e6b43f8d5779415bf54 (diff)
Merge commit 'origin/master' into gallium-0.2
Conflicts: src/mesa/glapi/descrip.mms src/mesa/shader/grammar/descrip.mms
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mklib24
1 files changed, 23 insertions, 1 deletions
diff --git a/bin/mklib b/bin/mklib
index a25d5bfaeb..d7b740f8e3 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -260,9 +260,31 @@ case $ARCH in
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
+
+ # expand any .a objects into constituent .o files.
+ NEWOBJECTS=""
+ DELETIA=""
+ for OBJ in ${OBJECTS} ; do
+ if [ `expr match $OBJ '.*\.a'` -gt 0 ] ; then
+ # extract the .o files from this .a archive
+ FILES=`ar t $OBJ`
+ ar x $OBJ
+ NEWOBJECTS="$NEWOBJECTS $FILES"
+ # keep track of temporary .o files and delete them below
+ DELETIA="$DELETIA $FILES"
+ else
+ # ordinary .o file
+ NEWOBJECTS="$NEWOBJECTS $OBJ"
+ fi
+ done
+
# make lib
- ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
+ ${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS}
ranlib ${LIBNAME}
+
+ # remove temporary extracted .o files
+ rm -f ${DELETIA}
+
# finish up
FINAL_LIBS=${LIBNAME}
else