native bullet build:

- remove cmake clean, fix cross-compile

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8909 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 068d626e6b
commit 0ba9fc4638
  1. 30
      engine/nbproject/build-bullet-natives.xml
  2. 21
      engine/nbproject/bullet-native.properties

@ -255,7 +255,7 @@
<delete file="bullet-api-diff.xml"/> <delete file="bullet-api-diff.xml"/>
</target> </target>
<target name="compile-native-library" description="compiles the native libbulletjme binary for the current platform" depends="-check-conditions-post, -create-folders, -nativelib-osx, -nativelib-windows, -nativelib-linux, -nativelib-linux-64, -nativelib-solaris, -nativelib-linux-mingw-64"/> <target name="compile-native-library" description="compiles the native libbulletjme binary for the current platform" depends="-check-conditions-post, -create-folders, -nativelib-osx, -nativelib-windows, -nativelib-linux, -nativelib-linux-64, -nativelib-linux-mingw, -nativelib-linux-mingw-64, -nativelib-solaris"/>
<target name="-create-folders" description="creates the needed folders"> <target name="-create-folders" description="creates the needed folders">
<mkdir dir="${bullet.source.dir}"/> <mkdir dir="${bullet.source.dir}"/>
@ -523,9 +523,6 @@
<target name="-compile-bullet-sources-linux" if="doBuildLinuxBase"> <target name="-compile-bullet-sources-linux" if="doBuildLinuxBase">
<mkdir dir="build/bullet-base"/> <mkdir dir="build/bullet-base"/>
<property location="build/bullet-base" name="build.folder.resolved"/> <property location="build/bullet-base" name="build.folder.resolved"/>
<exec executable="${make.linux}" dir="${bullet.folder}">
<arg value="clean"/>
</exec>
<exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true"> <exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true">
<arg value="-DCMAKE_SYSTEM_NAME=Linux"/> <arg value="-DCMAKE_SYSTEM_NAME=Linux"/>
<arg value="-DCMAKE_C_COMPILER=gcc"/> <arg value="-DCMAKE_C_COMPILER=gcc"/>
@ -537,8 +534,8 @@
<arg value="-DLIBRARY_OUTPUT_PATH='${build.folder.resolved}'"/> <arg value="-DLIBRARY_OUTPUT_PATH='${build.folder.resolved}'"/>
<arg value="-DBUILD_SHARED_LIBS=OFF"/> <arg value="-DBUILD_SHARED_LIBS=OFF"/>
<arg value="-DBUILD_STATIC_LIBS=ON"/> <arg value="-DBUILD_STATIC_LIBS=ON"/>
<arg value="-DCMAKE_C_FLAGS=-fPIC"/> <!--arg value="-DCMAKE_C_FLAGS=-fPIC"/>
<arg value="-DCMAKE_CXX_FLAGS=-fPIC"/> <arg value="-DCMAKE_CXX_FLAGS=-fPIC"/-->
<arg value="-DCMAKE_C_FLAGS=-m32"/> <arg value="-DCMAKE_C_FLAGS=-m32"/>
<arg value="-DCMAKE_CXX_FLAGS=-m32"/> <arg value="-DCMAKE_CXX_FLAGS=-m32"/>
<arg value="-DCMAKE_LD_FLAGS=-m32"/> <arg value="-DCMAKE_LD_FLAGS=-m32"/>
@ -548,25 +545,22 @@
</exec> </exec>
<exec executable="${make.linux}" dir="${bullet.folder}"/> <exec executable="${make.linux}" dir="${bullet.folder}"/>
<exec executable="ranlib"> <exec executable="ranlib">
<arg value="${basedir}/build/bullet-base-mingw/libBulletMultiThreaded.a"/> <arg value="${basedir}/build/bullet-base/libBulletMultiThreaded.a"/>
</exec> </exec>
<exec executable="ranlib"> <exec executable="ranlib">
<arg value="${basedir}/build/bullet-base-mingw/libBulletDynamics.a"/> <arg value="${basedir}/build/bullet-base/libBulletDynamics.a"/>
</exec> </exec>
<exec executable="ranlib"> <exec executable="ranlib">
<arg value="${basedir}/build/bullet-base-mingw/libBulletCollision.a"/> <arg value="${basedir}/build/bullet-base/libBulletCollision.a"/>
</exec> </exec>
<exec executable="ranlib"> <exec executable="ranlib">
<arg value="${basedir}/build/bullet-base-mingw/libLinearMath.a"/> <arg value="${basedir}/build/bullet-base/libLinearMath.a"/>
</exec> </exec>
</target> </target>
<target name="-compile-bullet-sources-linux-64" if="doBuildLinuxBase64"> <target name="-compile-bullet-sources-linux-64" if="doBuildLinuxBase64">
<mkdir dir="build/bullet-base-64"/> <mkdir dir="build/bullet-base-64"/>
<property location="build/bullet-base-64" name="build64.folder.resolved"/> <property location="build/bullet-base-64" name="build64.folder.resolved"/>
<exec executable="${make.linux}" dir="${bullet.folder}">
<arg value="clean"/>
</exec>
<exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true"> <exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true">
<arg value="-DCMAKE_SYSTEM_NAME=Linux"/> <arg value="-DCMAKE_SYSTEM_NAME=Linux"/>
<arg value="-DCMAKE_C_COMPILER=gcc"/> <arg value="-DCMAKE_C_COMPILER=gcc"/>
@ -578,8 +572,8 @@
<arg value="-DLIBRARY_OUTPUT_PATH='${build64.folder.resolved}'"/> <arg value="-DLIBRARY_OUTPUT_PATH='${build64.folder.resolved}'"/>
<arg value="-DBUILD_SHARED_LIBS=OFF"/> <arg value="-DBUILD_SHARED_LIBS=OFF"/>
<arg value="-DBUILD_STATIC_LIBS=ON"/> <arg value="-DBUILD_STATIC_LIBS=ON"/>
<!--arg value="-DCMAKE_C_FLAGS=-fPIC"/> <arg value="-DCMAKE_C_FLAGS=-fPIC"/>
<arg value="-DCMAKE_CXX_FLAGS=-fPIC"/--> <arg value="-DCMAKE_CXX_FLAGS=-fPIC"/>
<arg value="-DBUILD_EXTRAS=off"/> <arg value="-DBUILD_EXTRAS=off"/>
<arg value="-DBUILD_DEMOS=off"/> <arg value="-DBUILD_DEMOS=off"/>
<arg value="-DCMAKE_BUILD_TYPE=Release"/> <arg value="-DCMAKE_BUILD_TYPE=Release"/>
@ -588,9 +582,6 @@
</target> </target>
<target name="-compile-bullet-sources-linux-mingw" depends="-fix-bullet-sources" if="doBuildLinuxBaseMingw"> <target name="-compile-bullet-sources-linux-mingw" depends="-fix-bullet-sources" if="doBuildLinuxBaseMingw">
<exec executable="${make.linux}" dir="${bullet.folder}">
<arg value="clean"/>
</exec>
<exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true"> <exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true">
<arg value="-DCMAKE_SYSTEM_NAME=Windows"/> <arg value="-DCMAKE_SYSTEM_NAME=Windows"/>
<arg value="-DCMAKE_C_COMPILER=${cross.compile.target}-gcc"/> <arg value="-DCMAKE_C_COMPILER=${cross.compile.target}-gcc"/>
@ -626,9 +617,6 @@
</target> </target>
<target name="-compile-bullet-sources-linux-mingw-64" depends="-fix-bullet-sources" if="doBuildLinuxBaseMingw64"> <target name="-compile-bullet-sources-linux-mingw-64" depends="-fix-bullet-sources" if="doBuildLinuxBaseMingw64">
<exec executable="${make.linux}" dir="${bullet.folder}">
<arg value="clean"/>
</exec>
<exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true"> <exec executable="${cmake.linux}" dir="${bullet.folder}" failonerror="true">
<arg value="-DCMAKE_SYSTEM_NAME=Windows"/> <arg value="-DCMAKE_SYSTEM_NAME=Windows"/>
<arg value="-DCMAKE_C_COMPILER=${cross.compile.target64}-gcc"/> <arg value="-DCMAKE_C_COMPILER=${cross.compile.target64}-gcc"/>

@ -4,13 +4,15 @@
bullet.library.name=bulletjme bullet.library.name=bulletjme
bullet.library.version=0.9 bullet.library.version=0.9
# change if bullet folder has different name # location of Android NDK if available
ndk.dir=/opt/android-ndk-r7
# change if bullet version changes
bullet.folder=../bullet-2.79 bullet.folder=../bullet-2.79
bullet.download=http://bullet.googlecode.com/files/bullet-2.79-rev2440.zip bullet.download=http://bullet.googlecode.com/files/bullet-2.79-rev2440.zip
# compile options # compile options
bullet.compile.debug=false bullet.compile.debug=false
# native library compilation options # native library compilation options
bullet.osx.compiler=g++ bullet.osx.compiler=g++
bullet.osx.syslibroot=/Developer/SDKs/MacOSX10.6.sdk bullet.osx.syslibroot=/Developer/SDKs/MacOSX10.6.sdk
@ -18,15 +20,12 @@ bullet.osx.syslibroot=/Developer/SDKs/MacOSX10.6.sdk
bullet.windows.compiler=g++ bullet.windows.compiler=g++
bullet.linux.compiler=g++ bullet.linux.compiler=g++
bullet.solaris.compiler=g++ bullet.solaris.compiler=g++
#cross compilation options
#cross compilation options, disable if just developing / testing on linux
cross.compile=true cross.compile=true
cross.compile.target=i686-w64-mingw32 cross.compile.target=i686-w64-mingw32
cross.compile.target64=x86_64-w64-mingw32 cross.compile.target64=x86_64-w64-mingw32
bullet.linux.crosscompiler=gcc-cross bullet.linux.crosscompiler=g++-cross
# native header include directories
bullet.java.include=${java.home}/../include
# OSX has no JRE, only JDK
bullet.osx.java.include=/System/Library/Frameworks/JavaVM.framework/Headers
# exec command for cmake and make for different platforms, # exec command for cmake and make for different platforms,
# needed to compile bullet before compiling the jme bullet libraries # needed to compile bullet before compiling the jme bullet libraries
@ -37,8 +36,10 @@ make.linux=make
cmake.osx=/opt/local/bin/cmake cmake.osx=/opt/local/bin/cmake
make.osx=make make.osx=make
# location of Android NDK if available # native header include directories
ndk.dir=/opt/android-ndk-r7 bullet.java.include=${java.home}/../include
# OSX has no JRE, only JDK
bullet.osx.java.include=/System/Library/Frameworks/JavaVM.framework/Headers
# dont change these.. # dont change these..
bullet.bullet.include=${bullet.folder}/src bullet.bullet.include=${bullet.folder}/src

Loading…
Cancel
Save