summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-11 09:17:06 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-08-11 09:17:06 -0700
commitac0d19601caf1f3f86cb30cbafb9c000479e2b37 (patch)
treec59521328c9d45c23c83a7da98931b09b4686a1d /bin
parent1724334d7c82abe55b6506dfe369df4facae6f06 (diff)
Apple: Cleaned up some linking and dylib ids issues
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mklib20
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/mklib b/bin/mklib
index 69e82420a1..a25d5bfaeb 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -43,7 +43,7 @@ ARCH="auto"
ARCHOPT=""
NOPREFIX=0
EXPORTS=""
-
+ID=""
#
# Parse arguments
@@ -75,6 +75,7 @@ do
echo ' -altopts OPTS alternate options to override all others'
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
echo ' -exports FILE only export the symbols listed in FILE'
+ echo ' -id NAME Sets the id of the dylib (Darwin)'
echo ' -h, --help display this information and exit'
exit 1
;;
@@ -153,6 +154,10 @@ do
shift 1;
EXPORTS=$1
;;
+ '-id')
+ shift 1;
+ ID=$1
+ ;;
-*)
echo "mklib: Unknown option: " $1 ;
exit 1
@@ -196,6 +201,7 @@ if [ ] ; then
echo PATCH is $PATCH
echo DEPS are $DEPS
echo "EXPORTS in" $EXPORTS
+ echo ID is $ID
echo "-----------------"
fi
@@ -630,13 +636,19 @@ case $ARCH in
LIBSUFFIX="bundle"
OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
else
- LIBSUFFIX="dylib"
- OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+ LIBSUFFIX="dylib"
+ if [ -z "$ID" ] ; then
+ ID="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+ fi
+ OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name ${ID}"
fi
if [ ${EXPORTS} ] ; then
+ if [ -f ${EXPORTS}".darwin" ] ; then
+ EXPORTS=$EXPORTS".darwin"
+ fi
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
- fi
+ fi
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"