diff --git a/Extras/ConvexDecomposition/premake4.lua b/Extras/ConvexDecomposition/premake4.lua index 05ae0f685..9310593a7 100644 --- a/Extras/ConvexDecomposition/premake4.lua +++ b/Extras/ConvexDecomposition/premake4.lua @@ -3,6 +3,9 @@ kind "StaticLib" includedirs {".","../../src"} + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "**.cpp", "**.h" diff --git a/Extras/HACD/premake4.lua b/Extras/HACD/premake4.lua index 14b83929a..c2f03c173 100644 --- a/Extras/HACD/premake4.lua +++ b/Extras/HACD/premake4.lua @@ -3,6 +3,9 @@ kind "StaticLib" includedirs {"."} + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "**.cpp", "**.h" diff --git a/Extras/InverseDynamics/premake4.lua b/Extras/InverseDynamics/premake4.lua index 0a524d46a..c1e263bfb 100644 --- a/Extras/InverseDynamics/premake4.lua +++ b/Extras/InverseDynamics/premake4.lua @@ -6,6 +6,9 @@ "../../src" } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "*.cpp", "*.hpp" diff --git a/Extras/Serialize/BulletFileLoader/premake4.lua b/Extras/Serialize/BulletFileLoader/premake4.lua index a1a814278..9fa0cb00c 100644 --- a/Extras/Serialize/BulletFileLoader/premake4.lua +++ b/Extras/Serialize/BulletFileLoader/premake4.lua @@ -2,6 +2,10 @@ kind "StaticLib" + if os.is("Linux") then + buildoptions{"-fPIC"} + end + includedirs { "../../../src" } diff --git a/Extras/Serialize/BulletWorldImporter/premake4.lua b/Extras/Serialize/BulletWorldImporter/premake4.lua index 4d2d9d879..e7dbd9a77 100644 --- a/Extras/Serialize/BulletWorldImporter/premake4.lua +++ b/Extras/Serialize/BulletWorldImporter/premake4.lua @@ -6,7 +6,11 @@ "../BulletFileLoader", "../../../src" } - + + if os.is("Linux") then + buildoptions{"-fPIC"} + end + files { "**.cpp", "**.h" diff --git a/Extras/Serialize/BulletXmlWorldImporter/premake4.lua b/Extras/Serialize/BulletXmlWorldImporter/premake4.lua index 147f3e951..d940dfd8a 100644 --- a/Extras/Serialize/BulletXmlWorldImporter/premake4.lua +++ b/Extras/Serialize/BulletXmlWorldImporter/premake4.lua @@ -1,7 +1,7 @@ project "BulletXmlWorldImporter" kind "StaticLib" - targetdir "../../lib" + --targetdir "../../lib" includedirs { "../BulletWorldImporter", "../BulletFileLoader", @@ -11,4 +11,4 @@ files { "**.cpp", "**.h" - } \ No newline at end of file + } diff --git a/Extras/VHACD/src/premake4.lua b/Extras/VHACD/src/premake4.lua index 3566943be..10083cffe 100644 --- a/Extras/VHACD/src/premake4.lua +++ b/Extras/VHACD/src/premake4.lua @@ -1,6 +1,9 @@ project "vhacd" kind "StaticLib" + if os.is("Linux") then + buildoptions{"-fPIC"} + end includedirs { "../inc","../public", } diff --git a/data/multibody.bullet b/data/multibody.bullet index 9f8e7ab89..d621a77ca 100644 Binary files a/data/multibody.bullet and b/data/multibody.bullet differ diff --git a/examples/ExampleBrowser/premake4.lua b/examples/ExampleBrowser/premake4.lua index 65e38ece8..3c38d756d 100644 --- a/examples/ExampleBrowser/premake4.lua +++ b/examples/ExampleBrowser/premake4.lua @@ -3,7 +3,11 @@ project "App_BulletExampleBrowser" language "C++" kind "ConsoleApp" - + + if os.is("Linux") then + buildoptions{"-fPIC"} + end + hasCL = findOpenCL("clew") if (hasCL) then @@ -209,6 +213,10 @@ project "BulletExampleBrowserLib" "../../src", "../ThirdPartyLibs", } + + if os.is("Linux") then + buildoptions{"-fPIC"} + end if _OPTIONS["lua"] then includedirs{"../ThirdPartyLibs/lua-5.2.3/src"} diff --git a/examples/OpenGLWindow/premake4.lua b/examples/OpenGLWindow/premake4.lua index 17dfdda09..e0b163678 100644 --- a/examples/OpenGLWindow/premake4.lua +++ b/examples/OpenGLWindow/premake4.lua @@ -12,7 +12,11 @@ "../ThirdPartyLibs", "../../src", } - + + if os.is("Linux") then + buildoptions{"-fPIC"} + end + --links { --} diff --git a/examples/SharedMemory/premake4.lua b/examples/SharedMemory/premake4.lua index a81acd4b9..fd5f87543 100644 --- a/examples/SharedMemory/premake4.lua +++ b/examples/SharedMemory/premake4.lua @@ -12,6 +12,9 @@ includedirs {".","../../src", "../ThirdPartyLibs"} links { "BulletSoftBody", "Bullet3Common","BulletInverseDynamicsUtils", "BulletInverseDynamics", "BulletDynamics","BulletCollision", "LinearMath", "BussIK" } +if os.is("Linux") then + links{"dl"} +end language "C++" diff --git a/examples/SharedMemory/tcp/premake4.lua b/examples/SharedMemory/tcp/premake4.lua index 790294228..46596cec1 100644 --- a/examples/SharedMemory/tcp/premake4.lua +++ b/examples/SharedMemory/tcp/premake4.lua @@ -73,6 +73,7 @@ links { end if os.is("Linux") then defines {"_LINUX"} + links{"dl"} end if os.is("MacOSX") then defines {"_DARWIN"} diff --git a/examples/SharedMemory/udp/premake4.lua b/examples/SharedMemory/udp/premake4.lua index 1255c236c..dd8f64d61 100644 --- a/examples/SharedMemory/udp/premake4.lua +++ b/examples/SharedMemory/udp/premake4.lua @@ -14,6 +14,7 @@ project ("App_PhysicsServerSharedMemoryBridgeUDP") links {"Ws2_32","Winmm"} end if os.is("Linux") then + links{"dl"} end if os.is("MacOSX") then end @@ -68,6 +69,9 @@ if os.is("Windows") then defines { "WIN32" } links {"Ws2_32","Winmm"} end + if os.is("Linux") then + links{"dl"} + end language "C++" diff --git a/examples/ThirdPartyLibs/BussIK/premake4.lua b/examples/ThirdPartyLibs/BussIK/premake4.lua index 74a0630a0..a999b0e0f 100644 --- a/examples/ThirdPartyLibs/BussIK/premake4.lua +++ b/examples/ThirdPartyLibs/BussIK/premake4.lua @@ -5,6 +5,9 @@ includedirs { "." } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "*.cpp", "*.h", diff --git a/examples/ThirdPartyLibs/Gwen/premake4.lua b/examples/ThirdPartyLibs/Gwen/premake4.lua index 74d16aac9..c456a8da3 100644 --- a/examples/ThirdPartyLibs/Gwen/premake4.lua +++ b/examples/ThirdPartyLibs/Gwen/premake4.lua @@ -11,6 +11,9 @@ end defines { "GWEN_COMPILE_STATIC" } defines { "DONT_USE_GLUT"} + if os.is("Linux") then + buildoptions{"-fPIC"} + end includedirs { ".",".." } diff --git a/examples/ThirdPartyLibs/clsocket/premake4.lua b/examples/ThirdPartyLibs/clsocket/premake4.lua index 57447b1fa..9e3ce2d0b 100644 --- a/examples/ThirdPartyLibs/clsocket/premake4.lua +++ b/examples/ThirdPartyLibs/clsocket/premake4.lua @@ -16,6 +16,9 @@ includedirs { ".","include","src" } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "src/SimpleSocket.cpp", "src/ActiveSocket.cpp", diff --git a/examples/ThirdPartyLibs/enet/premake4.lua b/examples/ThirdPartyLibs/enet/premake4.lua index 05390e766..4eb2036b6 100644 --- a/examples/ThirdPartyLibs/enet/premake4.lua +++ b/examples/ThirdPartyLibs/enet/premake4.lua @@ -18,6 +18,9 @@ includedirs { ".","include" } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "callbacks.c", "compress.c", diff --git a/examples/ThirdPartyLibs/lua-5.2.3/premake4.lua b/examples/ThirdPartyLibs/lua-5.2.3/premake4.lua index 504ccb83c..a82fff668 100644 --- a/examples/ThirdPartyLibs/lua-5.2.3/premake4.lua +++ b/examples/ThirdPartyLibs/lua-5.2.3/premake4.lua @@ -18,6 +18,9 @@ includedirs { "src" } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "src/*.c", "src/*.h" diff --git a/examples/ThirdPartyLibs/serial/premake4.lua b/examples/ThirdPartyLibs/serial/premake4.lua index f57a6618f..d2dfeb637 100644 --- a/examples/ThirdPartyLibs/serial/premake4.lua +++ b/examples/ThirdPartyLibs/serial/premake4.lua @@ -4,6 +4,9 @@ includedirs {"include"} + if os.is("Linux") then + buildoptions{"-fPIC"} + end if os.is("Windows") then files{ "src/impl/win.cc", diff --git a/src/Bullet3Collision/premake4.lua b/src/Bullet3Collision/premake4.lua index 0b47f8ea5..bd0da541e 100644 --- a/src/Bullet3Collision/premake4.lua +++ b/src/Bullet3Collision/premake4.lua @@ -6,6 +6,9 @@ includedirs {".."} + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "**.cpp", diff --git a/src/Bullet3Common/premake4.lua b/src/Bullet3Common/premake4.lua index 1331c6327..f03573ec2 100644 --- a/src/Bullet3Common/premake4.lua +++ b/src/Bullet3Common/premake4.lua @@ -4,6 +4,10 @@ kind "StaticLib" + if os.is("Linux") then + buildoptions{"-fPIC"} + end + includedirs {".."} files { diff --git a/src/Bullet3Dynamics/premake4.lua b/src/Bullet3Dynamics/premake4.lua index 669336a6a..e05b2cd19 100644 --- a/src/Bullet3Dynamics/premake4.lua +++ b/src/Bullet3Dynamics/premake4.lua @@ -8,6 +8,9 @@ ".." } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "**.cpp", diff --git a/src/Bullet3Geometry/premake4.lua b/src/Bullet3Geometry/premake4.lua index 1a230f8c0..cce93f7ee 100644 --- a/src/Bullet3Geometry/premake4.lua +++ b/src/Bullet3Geometry/premake4.lua @@ -6,6 +6,9 @@ includedirs {".."} + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "**.cpp", diff --git a/src/Bullet3OpenCL/premake4.lua b/src/Bullet3OpenCL/premake4.lua index 55a861363..ee35fdb52 100644 --- a/src/Bullet3OpenCL/premake4.lua +++ b/src/Bullet3OpenCL/premake4.lua @@ -9,6 +9,9 @@ function createProject(vendor) kind "StaticLib" + if os.is("Linux") then + buildoptions{"-fPIC"} + end includedirs { ".",".." diff --git a/src/Bullet3Serialize/Bullet2FileLoader/premake4.lua b/src/Bullet3Serialize/Bullet2FileLoader/premake4.lua index ec2f0a51a..b9ee301be 100644 --- a/src/Bullet3Serialize/Bullet2FileLoader/premake4.lua +++ b/src/Bullet3Serialize/Bullet2FileLoader/premake4.lua @@ -5,6 +5,10 @@ includedirs { "../../../src" } + + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "**.cpp", diff --git a/src/BulletCollision/premake4.lua b/src/BulletCollision/premake4.lua index 70407771d..6297bf3df 100644 --- a/src/BulletCollision/premake4.lua +++ b/src/BulletCollision/premake4.lua @@ -1,6 +1,9 @@ project "BulletCollision" kind "StaticLib" + if os.is("Linux") then + buildoptions{"-fPIC"} + end includedirs { "..", } diff --git a/src/BulletDynamics/premake4.lua b/src/BulletDynamics/premake4.lua index 32414dce3..fdaf0513d 100644 --- a/src/BulletDynamics/premake4.lua +++ b/src/BulletDynamics/premake4.lua @@ -3,6 +3,9 @@ includedirs { "..", } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "Dynamics/*.cpp", "Dynamics/*.h", diff --git a/src/BulletInverseDynamics/premake4.lua b/src/BulletInverseDynamics/premake4.lua index 774e037b3..fdd176b09 100644 --- a/src/BulletInverseDynamics/premake4.lua +++ b/src/BulletInverseDynamics/premake4.lua @@ -1,6 +1,9 @@ project "BulletInverseDynamics" kind "StaticLib" + if os.is("Linux") then + buildoptions{"-fPIC"} + end includedirs { "..", } diff --git a/src/BulletSoftBody/premake4.lua b/src/BulletSoftBody/premake4.lua index 57a575fb1..a75e33619 100644 --- a/src/BulletSoftBody/premake4.lua +++ b/src/BulletSoftBody/premake4.lua @@ -5,6 +5,9 @@ includedirs { "..", } + if os.is("Linux") then + buildoptions{"-fPIC"} + end files { "**.cpp", "**.h" diff --git a/src/LinearMath/premake4.lua b/src/LinearMath/premake4.lua index 524e2c316..5f0fda6bf 100644 --- a/src/LinearMath/premake4.lua +++ b/src/LinearMath/premake4.lua @@ -1,6 +1,9 @@ project "LinearMath" kind "StaticLib" + if os.is("Linux") then + buildoptions{"-fPIC"} + end includedirs { "..", } diff --git a/test/SharedMemory/premake4.lua b/test/SharedMemory/premake4.lua index 31f19ada2..57f2adf49 100644 --- a/test/SharedMemory/premake4.lua +++ b/test/SharedMemory/premake4.lua @@ -164,6 +164,9 @@ project ("Test_PhysicsServerLoopBack") "BussIK", "LinearMath" } + if os.is("Linux") then + links{"dl"} + end files { "test.c", @@ -250,6 +253,9 @@ end "BussIK", "LinearMath" } + if os.is("Linux") then + links{"dl"} + end files { "test.c", diff --git a/test/gtest-1.7.0/premake4.lua b/test/gtest-1.7.0/premake4.lua index 79aade120..1d96f8315 100644 --- a/test/gtest-1.7.0/premake4.lua +++ b/test/gtest-1.7.0/premake4.lua @@ -16,3 +16,7 @@ includedirs { ".","include" } + if os.is("Linux") then + buildoptions{"-fPIC"} + end + \ No newline at end of file