From 23f612bbb532d0375397f80fd7c0d4394943accb Mon Sep 17 00:00:00 2001 From: "erwin.coumans@gmail.com" Date: Tue, 22 Oct 2013 18:10:45 +0000 Subject: [PATCH] fix Linux build by default, only enable 64bit build when using ./premake4_linux64 and only 32bit build when using ./premake4_linux remove some warning --- build/premake4.lua | 13 +++++++++++-- .../ConstraintSolver/btTypedConstraint.h | 2 +- src/LinearMath/btScalar.h | 19 ++++++++++++++++++- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/build/premake4.lua b/build/premake4.lua index e3f419709..c7c114df2 100644 --- a/build/premake4.lua +++ b/build/premake4.lua @@ -54,8 +54,17 @@ solution "0BulletSolution" flags { "Optimize", "EnableSSE", "StaticRuntime", "NoMinimalRebuild", "FloatFast"} configuration "Debug" flags { "Symbols", "StaticRuntime" , "NoMinimalRebuild", "NoEditAndContinue" ,"FloatFast"} - - platforms {"x32", "x64"} + + if os.is("Linux") then + if os.is64bit() then + platforms {"x64"} + else + platforms {"x32"} + end + else + platforms {"x32", "x64"} + end + --platforms {"x32"} configuration {"Windows"} diff --git a/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h index bbcd470ad..b58f984d0 100644 --- a/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h +++ b/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h @@ -414,7 +414,7 @@ struct btTypedConstraintData int m_isEnabled; }; -#endif BACKWARDS_COMPATIBLE +#endif //BACKWARDS_COMPATIBLE struct btTypedConstraintDoubleData { diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h index 9a5984388..dbf1195a5 100644 --- a/src/LinearMath/btScalar.h +++ b/src/LinearMath/btScalar.h @@ -322,7 +322,24 @@ inline __m128 operator * (const __m128 A, const __m128 B) #define BT_INFINITY INFINITY #define BT_NAN NAN #endif//_WIN32 -#endif //BT_USE_SSE_IN_API +#else + +#ifdef BT_USE_NEON + #include + + typedef float32x4_t btSimdFloat4; + #define BT_INFINITY INFINITY + #define BT_NAN NAN + #define btAssign128(r0,r1,r2,r3) (float32x4_t){r0,r1,r2,r3} +#else//BT_USE_NEON + + #ifndef BT_INFINITY + static int btInfinityMask = 0x7F800000; + #define BT_INFINITY (*(float*)&btInfinityMask) + #endif +#endif//BT_USE_NEON + +#endif //BT_USE_SSE #ifdef BT_USE_NEON #include