Fixed mklib to properly merge static libraries on darwin.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
This commit is contained in:

committed by
Dan Nicholson

parent
909c08d177
commit
54f9c509a1
12
bin/mklib
12
bin/mklib
@@ -743,12 +743,20 @@ case $ARCH in
|
|||||||
if [ $STATIC = 1 ] ; then
|
if [ $STATIC = 1 ] ; then
|
||||||
LIBNAME="lib${LIBNAME}.a"
|
LIBNAME="lib${LIBNAME}.a"
|
||||||
echo "mklib: Making Darwin static library: " ${LIBNAME}
|
echo "mklib: Making Darwin static library: " ${LIBNAME}
|
||||||
LINK="ar"
|
|
||||||
OPTS="-ruvs"
|
OPTS="-ruvs"
|
||||||
if [ "${ALTOPTS}" ] ; then
|
if [ "${ALTOPTS}" ] ; then
|
||||||
OPTS=${ALTOPTS}
|
OPTS=${ALTOPTS}
|
||||||
fi
|
fi
|
||||||
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
|
||||||
|
# expand .a into .o files
|
||||||
|
NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
|
||||||
|
|
||||||
|
# make static lib
|
||||||
|
FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
|
||||||
|
|
||||||
|
# remove temporary extracted .o files
|
||||||
|
rm -rf ${LIBNAME}.obj
|
||||||
|
|
||||||
FINAL_LIBS=${LIBNAME}
|
FINAL_LIBS=${LIBNAME}
|
||||||
else
|
else
|
||||||
# On Darwin a .bundle is used for a library that you want to dlopen
|
# On Darwin a .bundle is used for a library that you want to dlopen
|
||||||
|
Reference in New Issue
Block a user