From: <eli...@us...> - 2006-07-07 12:41:54
|
Revision: 2453 Author: elias_naur Date: 2006-07-07 05:41:36 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2453&view=rev Log Message: ----------- Mac OS X: Added support for compile_native target. Moved optional libraries to compile_native_optional target Modified Paths: -------------- trunk/LWJGL/build.xml Added Paths: ----------- trunk/LWJGL/platform_build/macosx_ant/ trunk/LWJGL/platform_build/macosx_ant/build-symbol-list trunk/LWJGL/platform_build/macosx_ant/build.xml Removed Paths: ------------- trunk/LWJGL/src/native/macosx/build-symbol-list trunk/LWJGL/src/native/macosx/build.xml Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2006-07-07 11:47:56 UTC (rev 2452) +++ trunk/LWJGL/build.xml 2006-07-07 12:41:36 UTC (rev 2453) @@ -646,10 +646,10 @@ </condition> <antcall target="-compile_native_linux" /> - <condition property="lwjgl.platform.mac"> + <condition property="lwjgl.platform.macosx"> <os name="Mac OS X" /> </condition> - <antcall target="-compile_native_mac" /> + <antcall target="-compile_native_macosx" /> </target> <target name="compile_native_optional" depends="headers" description="Compiles the native files"> @@ -658,6 +658,10 @@ <os name="Linux" /> </condition> <antcall target="-compile_native_linux_optional" /> + <condition property="lwjgl.platform.macosx"> + <os name="Mac OS X" /> + </condition> + <antcall target="-compile_native_macosx_optional" /> </target> @@ -706,7 +710,7 @@ <!-- Compiles LWJGL on Linux platforms --> <target name="-compile_native_linux" if="lwjgl.platform.linux"> <ant antfile="platform_build/linux_ant/build.xml" inheritAll="false"/> - <copy file="${lwjgl.bin}/liblwjgl.so" tofile="${lwjgl.lib}/linux/liblwjgl.so" /> + <copy file="${lwjgl.bin}/liblwjgl.so" todir="${lwjgl.lib}/linux"/> </target> <target name="-compile_native_linux_optional" if="lwjgl.platform.linux"> @@ -715,7 +719,6 @@ <fail message="Missing JAVA_HOME path environment property" unless="env.JAVA_HOME"/> <fail message="Missing FMOD path environment property" unless="env.FMOD"/> - <exec executable="make" dir="${lwjgl.src.native}/linux"/> <exec executable="make" dir="${lwjgl.src.native}/common/devil"> <arg line="-f Makefile.linux"/> </exec> @@ -726,22 +729,25 @@ <move file="${lwjgl.src.native}/common/fmod3/liblwjgl-fmod3.so" tofile="${lwjgl.lib}/linux/liblwjgl-fmod3.so" /> </target> + <target name="-compile_native_macosx" if="lwjgl.platform.macosx"> + <ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/> + <copy file="${lwjgl.bin}/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/> + </target> + <!-- Compiles LWJGL on Mac OS X platforms --> - <target name="-compile_native_mac" if="lwjgl.platform.mac"> + <target name="-compile_native_macosx_optional" if="lwjgl.platform.macosx"> <!-- check for required properties --> <property environment="env"/> <fail message="Missing AL path environment property" unless="env.AL"/> <fail message="Missing FMOD path environment property" unless="env.FMOD"/> - <exec executable="make" dir="${lwjgl.src.native}/macosx" failonerror="true"/> <exec executable="make" dir="${lwjgl.src.native}/common/devil"> <arg line="-f Makefile.macosx"/> </exec> <exec executable="make" dir="${lwjgl.src.native}/common/fmod3"> <arg line="-f Makefile.macosx"/> </exec> - <move file="${lwjgl.src.native}/macosx/liblwjgl.jnilib" tofile="${lwjgl.lib}/macosx/liblwjgl.jnilib" /> <move file="${lwjgl.src.native}/common/devil/liblwjgl-devil.jnilib" tofile="${lwjgl.lib}/macosx/liblwjgl-devil.jnilib" /> <move file="${lwjgl.src.native}/common/fmod3/liblwjgl-fmod3.jnilib" tofile="${lwjgl.lib}/macosx/liblwjgl-fmod3.jnilib" /> </target> Copied: trunk/LWJGL/platform_build/macosx_ant/build-symbol-list (from rev 2451, trunk/LWJGL/src/native/macosx/build-symbol-list) =================================================================== --- trunk/LWJGL/platform_build/macosx_ant/build-symbol-list (rev 0) +++ trunk/LWJGL/platform_build/macosx_ant/build-symbol-list 2006-07-07 12:41:36 UTC (rev 2453) @@ -0,0 +1,3 @@ +#!/bin/sh + +nm -g "$1"/*.o | grep "Java_" | cut -d ' ' -f3 | cut -c 1- Copied: trunk/LWJGL/platform_build/macosx_ant/build.xml (from rev 2451, trunk/LWJGL/src/native/macosx/build.xml) =================================================================== --- trunk/LWJGL/platform_build/macosx_ant/build.xml (rev 0) +++ trunk/LWJGL/platform_build/macosx_ant/build.xml 2006-07-07 12:41:36 UTC (rev 2453) @@ -0,0 +1,82 @@ +<?xml version="1.0" ?> +<project name="OS X Native code" basedir="../../bin" default="nativelibrary"> + <property name="native" location="../src/native"/> + + <target name="init"> + <mkdir dir="ppc"/> + <mkdir dir="intel"/> + </target> + + <target name="clean"> + <delete failonerror="false"> + <fileset dir="intel"/> + <fileset dir="ppc"/> + <fileset dir="." includes="liblwjgl.jnilib"/> + <fileset dir="." includes="lwjgl.symbols"/> + </delete> + </target> + + <target name="compile"> + <apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}"> + <arg line="${cflags} -O2 -Wall -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${native}/macosx"/> + <!-- Map from *.m and *.c to .o --> + <mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/> + <fileset dir="${native}/macosx" includes="*.m"/> + <fileset dir="${native}/macosx" includes="*.c"/> + <fileset dir="${native}/common" includes="*.c"/> + <fileset dir="${native}/generated" includes="*.c"/> + </apply> + </target> + + <target name="link"> + <apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true"> + <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon"/> + <fileset dir="${objdir}" includes="*.o"/> + </apply> + <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true"> + <arg line="-S -X"/> + <fileset dir="." file="${libname}"/> + </apply> + </target> + + <target name="nativelibrary" 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"/> + <antcall target="compile"> + <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="compile"> + <param name="dstdir" location="ppc"/> + <param name="compiler" value="gcc-3.3"/> + <param name="sdkroot" location="${legacy_sdkroot}"/> + <param name="cflags" value=""/> + </antcall> + <exec vmlauncher="false" executable="../platform_build/macosx_ant/build-symbol-list" output="lwjgl.symbols" failonerror="true"> + <arg path="intel"/> + </exec> + <antcall target="link"> + <param name="objdir" location="intel"/> + <param name="libname" value="liblwjgl-intel.jnilib"/> + <param name="linker" value="gcc-4.0"/> + <param name="linkerflags" value="${universal_flags}"/> + </antcall> + <antcall target="link"> + <param name="objdir" location="ppc"/> + <param name="libname" value="liblwjgl-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="liblwjgl.jnilib"/> + <fileset file="ppc/liblwjgl-ppc.jnilib"/> + <fileset file="intel/liblwjgl-intel.jnilib"/> + </apply> + </target> +</project> Deleted: trunk/LWJGL/src/native/macosx/build-symbol-list =================================================================== --- trunk/LWJGL/src/native/macosx/build-symbol-list 2006-07-07 11:47:56 UTC (rev 2452) +++ trunk/LWJGL/src/native/macosx/build-symbol-list 2006-07-07 12:41:36 UTC (rev 2453) @@ -1,3 +0,0 @@ -#!/bin/sh - -nm -g intel/*.o | grep "Java_" | cut -d ' ' -f3 | cut -c 1- Deleted: trunk/LWJGL/src/native/macosx/build.xml =================================================================== --- trunk/LWJGL/src/native/macosx/build.xml 2006-07-07 11:47:56 UTC (rev 2452) +++ trunk/LWJGL/src/native/macosx/build.xml 2006-07-07 12:41:36 UTC (rev 2453) @@ -1,76 +0,0 @@ -<?xml version="1.0" ?> -<project name="OS X Native code" basedir="." default="nativelibrary"> - <target name="init"> - <mkdir dir="ppc"/> - <mkdir dir="intel"/> - </target> - - <target name="clean"> - <delete failonerror="false"> - <fileset dir="intel"/> - <fileset dir="ppc"/> - <fileset dir="." includes="liblwjgl.jnilib"/> - </delete> - </target> - - <target name="compile"> - <apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}"> - <arg line="${cflags} -O2 -Wall -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I../../common -I.."/> - <mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/> - <fileset dir="." includes="*.m"/> - <fileset dir="." includes="*.c"/> - <fileset dir="../common" includes="*.c"/> - <fileset dir="../generated" includes="*.c"/> - </apply> - </target> - - <target name="link"> - <apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true"> - <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon"/> - <fileset dir="${objdir}" includes="*.o"/> - </apply> - <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true"> - <arg line="-S -X"/> - <fileset dir="." file="${libname}"/> - </apply> - </target> - - <target name="nativelibrary" 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"/> - <antcall target="compile"> - <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="compile"> - <param name="dstdir" location="ppc"/> - <param name="compiler" value="gcc-3.3"/> - <param name="sdkroot" location="${legacy_sdkroot}"/> - <param name="cflags" value=""/> - </antcall> - <exec executable="./build-symbol-list" output="lwjgl.symbols"/> - <antcall target="link"> - <param name="objdir" location="intel"/> - <param name="libname" value="liblwjgl-intel.jnilib"/> - <param name="linker" value="gcc-4.0"/> - <param name="linkerflags" value="${universal_flags}"/> - </antcall> - <antcall target="link"> - <param name="objdir" location="ppc"/> - <param name="libname" value="liblwjgl-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="liblwjgl.jnilib"/> - <fileset file="ppc/liblwjgl-ppc.jnilib"/> - <fileset file="intel/liblwjgl-intel.jnilib"/> - </apply> - </target> -</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |