aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/OSX
diff options
context:
space:
mode:
authorendolf <[email protected]>2006-05-14 09:14:52 +0000
committerendolf <[email protected]>2006-05-14 09:14:52 +0000
commit0815136a5f054f0da0343d46e85982a60bfa0b18 (patch)
tree82a0410e1a8323130c295bcbc28ce4adf7717cf0 /plugins/OSX
parent986c6106aa165d4168f6b8e1216eceb5353fce14 (diff)
Merge revision 12 of oddlabs svn repo.
Mac OS X: build.xml fix Windows: Fixed crash when Raw plugin fails to load Mac OS X: Tweak native libraries so only one library, libjinput-osx.jnilib contains both gcc 3 ppc code and gcc 4 i386 code. That way, we'll cover all releases and architectures with one native library instead of two git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@140 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins/OSX')
-rw-r--r--plugins/OSX/src/native/build.xml38
1 files changed, 23 insertions, 15 deletions
diff --git a/plugins/OSX/src/native/build.xml b/plugins/OSX/src/native/build.xml
index 9b338da..4c1a4ce 100644
--- a/plugins/OSX/src/native/build.xml
+++ b/plugins/OSX/src/native/build.xml
@@ -3,14 +3,15 @@
<description>OSX JInput Native Plugin</description>
<target name="init">
- <mkdir dir="universal"/>
- <mkdir dir="legacy"/>
+ <mkdir dir="ppc"/>
+ <mkdir dir="intel"/>
</target>
<target name="clean">
<delete failonerror="false">
- <fileset dir="universal"/>
- <fileset dir="legacy"/>
+ <fileset dir="intel"/>
+ <fileset dir="ppc"/>
+ <fileset file="libjinput-osx.jnilib"/>
</delete>
</target>
@@ -24,44 +25,51 @@
</target>
<target name="link">
- <apply dir="." parallel="true" executable="${linker}" os="Mac OS X" failonerror="true">
+ <apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
<arg line="${linkerflags} -dynamiclib -o ${libname} -framework JavaVM -framework CoreFoundation -framework IOKit -framework CoreServices"/>
<fileset dir="${objdir}" includes="*.o"/>
</apply>
- <apply dir="." parallel="true" executable="strip" os="Mac OS X" failonerror="true">
+ <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
<arg line="-S -X"/>
- <fileset dir="." includes="*.jnilib"/>
+ <fileset dir="." includes="${libname}"/>
</apply>
</target>
<target name="compileNativeJinputLib" depends="init">
<property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.4u.sdk"/>
<property name="legacy_sdkroot" location="/Developer/SDKs/MacOSX10.3.9.sdk"/>
- <property name="universal_flags" value="-isysroot ${universal_sdkroot} -arch i386 -arch ppc"/>
+ <property name="universal_flags" value="-isysroot ${universal_sdkroot} -arch i386"/>
<antcall target="compile">
- <param name="dstdir" location="universal"/>
+ <param name="dstdir" location="intel"/>
<param name="compiler" value="gcc-4.0"/>
<param name="sdkroot" location="${universal_sdkroot}"/>
<param name="cflags" value="${universal_flags}"/>
</antcall>
<antcall target="link">
- <param name="objdir" location="universal"/>
- <param name="libname" value="libjinput-osx.jnilib"/>
+ <param name="objdir" location="intel"/>
+ <param name="libname" value="libjinput-osx-intel.jnilib"/>
<param name="linker" value="gcc-4.0"/>
- <!-- <param name="linkerflags" value="${universal_flags} -Wl,-syslibroot,${universal_sdkroot}"/>-->
<param name="linkerflags" value="${universal_flags}"/>
</antcall>
<antcall target="compile">
- <param name="dstdir" location="legacy"/>
+ <param name="dstdir" location="ppc"/>
<param name="compiler" value="gcc-3.3"/>
<param name="sdkroot" location="${legacy_sdkroot}"/>
<param name="cflags" value=""/>
</antcall>
<antcall target="link">
- <param name="objdir" location="legacy"/>
- <param name="libname" value="libjinput-osx-legacy.jnilib"/>
+ <param name="objdir" location="ppc"/>
+ <param name="libname" value="libjinput-osx-ppc.jnilib"/>
<param name="linker" value="gcc-3.3"/>
<param name="linkerflags" value=""/>
</antcall>
+ <apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" >
+ <arg value="-create"/>
+ <srcfile/>
+ <arg value="-output"/>
+ <arg path="libjinput-osx.jnilib"/>
+ <fileset file="ppc/libjinput-osx-ppc.jnilib"/>
+ <fileset file="intel/libjinput-osx-intel.jnilib"/>
+ </apply>
</target>
</project>