diff options
author | Jason Perkins <starkos@industriousone.com> | 2013-02-07 19:59:05 +0400 |
---|---|---|
committer | Jason Perkins <starkos@industriousone.com> | 2013-02-07 19:59:05 +0400 |
commit | 7fd99f37c98ae37d053f3997da7a96dea79e092d (patch) | |
tree | 7b9dd42d53ee81d68dfb5ccc65d28f6fa6519474 /premake4.lua | |
parent | 65b2ea88641f53f2a69564d8651c1034e693eba2 (diff) |
A bit of cleanup on Linux and BSD build configurations
Diffstat (limited to 'premake4.lua')
-rw-r--r-- | premake4.lua | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/premake4.lua b/premake4.lua index 14cbfaa..1220073 100644 --- a/premake4.lua +++ b/premake4.lua @@ -1,27 +1,27 @@ -- -- Premake 4.x build configuration script --- +-- -- -- Define the project. Put the release configuration first so it will be the --- default when folks build using the makefile. That way they don't have to +-- default when folks build using the makefile. That way they don't have to -- worry about the /scripts argument and all that. -- solution "Premake4" configurations { "Release", "Debug" } location ( _OPTIONS["to"] ) - + project "Premake4" targetname "premake4" language "C" kind "ConsoleApp" - flags { "No64BitChecks", "ExtraWarnings", "StaticRuntime" } + flags { "No64BitChecks", "ExtraWarnings", "StaticRuntime" } includedirs { "src/host/lua-5.1.4/src" } - files + files { - "*.txt", "**.lua", + "*.txt", "**.lua", "src/**.h", "src/**.c", "src/host/scripts.c" } @@ -35,12 +35,12 @@ "src/host/lua-5.1.4/**.lua", "src/host/lua-5.1.4/etc/*.c" } - + configuration "Debug" targetdir "bin/debug" defines "_DEBUG" flags { "Symbols" } - + configuration "Release" targetdir "bin/release" defines "NDEBUG" @@ -48,32 +48,29 @@ configuration "vs*" defines { "_CRT_SECURE_NO_WARNINGS" } - + configuration "vs2005" defines {"_CRT_SECURE_NO_DEPRECATE" } configuration "windows" links { "ole32" } - configuration "linux" + configuration "linux or bsd" defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - links { "m", "dl" } + links { "m" } + linkoptions { "-rdynamic" } + + configuration "linux" + links { "dl" } - configuration "bsd" - defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - links { "m" } - configuration "macosx" defines { "LUA_USE_MACOSX" } links { "CoreServices.framework" } - + configuration { "macosx", "gmake" } buildoptions { "-mmacosx-version-min=10.4" } linkoptions { "-mmacosx-version-min=10.4" } - configuration { "linux or bsd" } - linkoptions { "-rdynamic" } - configuration { "solaris" } linkoptions { "-Wl,--export-dynamic" } @@ -87,8 +84,8 @@ os.rmdir("bin") os.rmdir("build") end - - + + -- -- Use the --to=path option to control where the project files get generated. I use @@ -105,13 +102,13 @@ -- --- Use the embed action to convert all of the Lua scripts into C strings, which +-- Use the embed action to convert all of the Lua scripts into C strings, which -- can then be built into the executable. Always embed the scripts before creating -- a release build. -- dofile("scripts/embed.lua") - + newaction { trigger = "embed", description = "Embed scripts in scripts.c; required before release builds", @@ -126,7 +123,7 @@ dofile("scripts/release.lua") - + newaction { trigger = "release", description = "Prepare a new release (incomplete)", |