Browse Source

native bullet build:
- remove cmake clean, fix cross-compile

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8909 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

nor..67 14 years ago
parent
commit
0ba9fc4638
2 changed files with 20 additions and 31 deletions
  1. 9 21
      engine/nbproject/build-bullet-natives.xml
  2. 11 10
      engine/nbproject/bullet-native.properties

+ 9 - 21
engine/nbproject/build-bullet-natives.xml

@@ -255,7 +255,7 @@
         <delete file="bullet-api-diff.xml"/>
     </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">
         <mkdir dir="${bullet.source.dir}"/>
@@ -523,9 +523,6 @@
     <target name="-compile-bullet-sources-linux" if="doBuildLinuxBase">
         <mkdir dir="build/bullet-base"/>
         <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">
             <arg value="-DCMAKE_SYSTEM_NAME=Linux"/>
             <arg value="-DCMAKE_C_COMPILER=gcc"/>
@@ -537,8 +534,8 @@
             <arg value="-DLIBRARY_OUTPUT_PATH='${build.folder.resolved}'"/>
             <arg value="-DBUILD_SHARED_LIBS=OFF"/>
             <arg value="-DBUILD_STATIC_LIBS=ON"/>
-            <arg value="-DCMAKE_C_FLAGS=-fPIC"/>
-            <arg value="-DCMAKE_CXX_FLAGS=-fPIC"/>
+            <!--arg value="-DCMAKE_C_FLAGS=-fPIC"/>
+            <arg value="-DCMAKE_CXX_FLAGS=-fPIC"/-->
             <arg value="-DCMAKE_C_FLAGS=-m32"/>
             <arg value="-DCMAKE_CXX_FLAGS=-m32"/>
             <arg value="-DCMAKE_LD_FLAGS=-m32"/>
@@ -548,25 +545,22 @@
         </exec>
         <exec executable="${make.linux}" dir="${bullet.folder}"/>
         <exec executable="ranlib">
-        	<arg value="${basedir}/build/bullet-base-mingw/libBulletMultiThreaded.a"/>
+        	<arg value="${basedir}/build/bullet-base/libBulletMultiThreaded.a"/>
         </exec>
         <exec executable="ranlib">
-        	<arg value="${basedir}/build/bullet-base-mingw/libBulletDynamics.a"/>
+        	<arg value="${basedir}/build/bullet-base/libBulletDynamics.a"/>
         </exec>
         <exec executable="ranlib">
-        	<arg value="${basedir}/build/bullet-base-mingw/libBulletCollision.a"/>
+        	<arg value="${basedir}/build/bullet-base/libBulletCollision.a"/>
         </exec>
         <exec executable="ranlib">
-        	<arg value="${basedir}/build/bullet-base-mingw/libLinearMath.a"/>
+        	<arg value="${basedir}/build/bullet-base/libLinearMath.a"/>
         </exec>
     </target>
 
     <target name="-compile-bullet-sources-linux-64" if="doBuildLinuxBase64">
         <mkdir dir="build/bullet-base-64"/>
         <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">
             <arg value="-DCMAKE_SYSTEM_NAME=Linux"/>
             <arg value="-DCMAKE_C_COMPILER=gcc"/>
@@ -578,8 +572,8 @@
             <arg value="-DLIBRARY_OUTPUT_PATH='${build64.folder.resolved}'"/>
             <arg value="-DBUILD_SHARED_LIBS=OFF"/>
             <arg value="-DBUILD_STATIC_LIBS=ON"/>
-            <!--arg value="-DCMAKE_C_FLAGS=-fPIC"/>
-            <arg value="-DCMAKE_CXX_FLAGS=-fPIC"/-->
+            <arg value="-DCMAKE_C_FLAGS=-fPIC"/>
+            <arg value="-DCMAKE_CXX_FLAGS=-fPIC"/>
             <arg value="-DBUILD_EXTRAS=off"/>
             <arg value="-DBUILD_DEMOS=off"/>
             <arg value="-DCMAKE_BUILD_TYPE=Release"/>
@@ -588,9 +582,6 @@
     </target>
 
     <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">
             <arg value="-DCMAKE_SYSTEM_NAME=Windows"/>
             <arg value="-DCMAKE_C_COMPILER=${cross.compile.target}-gcc"/>
@@ -626,9 +617,6 @@
     </target>
     
     <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">
             <arg value="-DCMAKE_SYSTEM_NAME=Windows"/>
             <arg value="-DCMAKE_C_COMPILER=${cross.compile.target64}-gcc"/>

+ 11 - 10
engine/nbproject/bullet-native.properties

@@ -4,13 +4,15 @@
 bullet.library.name=bulletjme
 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.download=http://bullet.googlecode.com/files/bullet-2.79-rev2440.zip
 
 # compile options
 bullet.compile.debug=false
-
 # native library compilation options
 bullet.osx.compiler=g++
 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.linux.compiler=g++
 bullet.solaris.compiler=g++
-#cross compilation options
+
+#cross compilation options, disable if just developing / testing on linux
 cross.compile=true
 cross.compile.target=i686-w64-mingw32
 cross.compile.target64=x86_64-w64-mingw32
-bullet.linux.crosscompiler=gcc-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
+bullet.linux.crosscompiler=g++-cross
 
 # exec command for cmake and make for different platforms,
 # needed to compile bullet before compiling the jme bullet libraries
@@ -37,8 +36,10 @@ make.linux=make
 cmake.osx=/opt/local/bin/cmake
 make.osx=make
 
-# location of Android NDK if available
-ndk.dir=/opt/android-ndk-r7
+# 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
 
 # dont change these..
 bullet.bullet.include=${bullet.folder}/src