diff options
Diffstat (limited to 'plugins/OSX')
-rw-r--r-- | plugins/OSX/src/native/build.xml | 38 |
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> |