summaryrefslogtreecommitdiffstats
path: root/debian/pilot-link/pilot-link-0.12.5-dfsg/darwin/build_framework.sh
diff options
context:
space:
mode:
Diffstat (limited to 'debian/pilot-link/pilot-link-0.12.5-dfsg/darwin/build_framework.sh')
-rwxr-xr-xdebian/pilot-link/pilot-link-0.12.5-dfsg/darwin/build_framework.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/debian/pilot-link/pilot-link-0.12.5-dfsg/darwin/build_framework.sh b/debian/pilot-link/pilot-link-0.12.5-dfsg/darwin/build_framework.sh
new file mode 100755
index 00000000..4b2075a9
--- /dev/null
+++ b/debian/pilot-link/pilot-link-0.12.5-dfsg/darwin/build_framework.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Build a libpisock.framework embeddable in an application
+#
+# Usage examples:
+#
+# sh build_framework.sh
+# builds the framework without prebinding
+#
+# sh build_framework.sh 0x12345678
+# builds the framework prebound at address 0x12345678, suited for
+# building frameworks that are going to be linked to prebound
+# executables
+#
+# Copyright (c) 2004, Florent Pillet
+#
+what=libpisock
+libs=../libpisock/.libs/libpisock.a
+linkflags="-framework Carbon -framework System -framework IOKit"
+gcc_version=`gcc --version | sed -e '2,$ d
+s/.*) \([[:digit:]+]\).[[:digit:]+].[[:digit:]+].*/\1/g'`
+if [ $gcc_version != 4 ];
+then
+ linkflags="$linkflags -lgcc";
+fi
+incs=../include
+
+rm -Rf $what.framework
+mkdir -p $what.framework/Versions/A/Headers
+
+if [ $1 ];
+then
+ export LD_PREBIND=1
+ linkflags="$linkflags -seg1addr $1";
+fi
+
+/usr/bin/libtool -v -dynamic -arch_only ppc \
+ -o $what.framework/Versions/A/$what \
+ -install_name @executable_path/../Frameworks/$what.framework/Versions/A/$what \
+ $libs $linkflags
+
+cp $incs/*.h $what.framework/Versions/A/Headers/
+
+cd $what.framework/Versions
+ln -sf A Current
+cd ..
+ln -sf Versions/Current/Headers Headers
+ln -sf Versions/Current/$what $what
+cd ..