diff options
author | 2015-05-31 13:20:42 +0200 | |
---|---|---|
committer | 2015-05-31 13:25:17 +0200 | |
commit | 511762fa2d25965d05fc277efd29fb4a50d95420 (patch) | |
tree | 09211cade5deaa068d2e2603ba93c4ca4d8b6951 /scripts/genie.lua | |
parent | 3a9d6f4b4be4bed19720eea2cffab021139bd241 (diff) |
Allow compiling with shared libraries [O. Galibert]
Put SHLIB=1 in the main makefile, or on the command line.
The idea is to get a *way* faster link with symbols. It works at
least on linux, with one annoying caveat: you have to be in the
build/projects/sdl/mame/gmake-linux directory to start mame
afterwards. We're going to move some things around to be able to use
LD_LIBRARY_PATH or have it start as-is from the root.
Diffstat (limited to 'scripts/genie.lua')
-rw-r--r-- | scripts/genie.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index 7b88a7d3ade..b4915406b25 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -311,6 +311,21 @@ newoption { } +newoption { + trigger = "SHLIB", + description = "Generate shared libs.", + allowed = { + { "0", "Static libs" }, + { "1", "Shared libs" }, + } +} + +if _OPTIONS["SHLIB"]=="1" then + LIBTYPE = "SharedLib" +else + LIBTYPE = "StaticLib" +end + PYTHON = "python" if _OPTIONS["PYTHON_EXECUTABLE"]~=nil then @@ -743,6 +758,12 @@ if _OPTIONS["OPTIMIZE"] then end end +if _OPTIONS["SHLIB"] then + buildoptions { + "-fPIC" + } +end + if _OPTIONS["SSE2"]=="1" then buildoptions { "-msse2", |