OSX: Build with statically linked libraries !

tested on OS X Mavericks 10.9.5 with macports
This commit is contained in:
Thomas BERNARD
2018-11-27 12:55:13 +01:00
committed by Thomas Bernard
parent d91290f63f
commit 2bee52b9af
2 changed files with 51 additions and 4 deletions

25
tools/osx_find_dependencies.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
# no argument : error
if [ ! -f $1 ] ; then
exit 1
fi
# more than one argument : iterate
if [ $# -ne 1 ] ; then
for arg in $@ ; do
$0 $arg
done | sort | uniq
exit 0
fi
#list=$(otool -L $1 | sed '1d' | grep -v libSystem.B | grep -v /System/Library | grep -v $1 | cut -f 2 | cut -d' ' -f 1)
list=$(otool -L $1 | sed '1d' | grep -v /usr/lib/lib | grep -v /System/Library | grep -v $1 | cut -f 2 | cut -d' ' -f 1)
#echo "$1 => $list" >&2
# recursive calls
for lib in $list ; do
echo $lib
$0 $lib
done | sort | uniq