Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstarkos <none@none>2008-12-27 16:33:10 +0300
committerstarkos <none@none>2008-12-27 16:33:10 +0300
commita883e7f51e42116daa46d88189714590276e2d1f (patch)
treec5ad2fcc218ed664301d54c0a4ae9edd8f25d78f /premake4.lua
parent6a2f41b5fcd004c1c2bb8090b6080fb33d3d5d76 (diff)
Some tweaks to allow location to be nil (handy when working with a location option)
Diffstat (limited to 'premake4.lua')
-rw-r--r--premake4.lua93
1 files changed, 50 insertions, 43 deletions
diff --git a/premake4.lua b/premake4.lua
index b4da202..058077e 100644
--- a/premake4.lua
+++ b/premake4.lua
@@ -9,56 +9,63 @@ if (_ACTION == "vs2002" or _ACTION == "vs2003") then
end
-solution "Premake4"
- configurations { "Release", "Debug" }
-
-
-project "Premake4"
- targetname "premake4"
- language "C"
- kind "ConsoleApp"
- flags { "No64BitChecks", "ExtraWarnings", "FatalWarnings" }
- includedirs { "src/host/lua-5.1.2/src" }
-
- files
- {
- "src/**.h", "src/**.c", "src/**.lua", "src/**.tmpl",
- "tests/**.lua"
- }
-
- excludes
- {
- "src/premake.lua",
- "src/host/lua-5.1.2/src/lua.c",
- "src/host/lua-5.1.2/src/luac.c",
- "src/host/lua-5.1.2/src/print.c",
- "src/host/lua-5.1.2/**.lua",
- "src/host/lua-5.1.2/etc/*.c"
- }
-
- configuration "Debug"
- targetdir "bin/debug"
- defines "_DEBUG"
- flags { "Symbols" }
-
- configuration "Release"
- targetdir "bin/release"
- defines "NDEBUG"
- flags { "OptimizeSize", "NoFramePointer" }
+--
+-- Define the project files.
+--
- configuration "vs*"
- defines { "_CRT_SECURE_NO_WARNINGS" }
+ solution "Premake4"
+ configurations { "Release", "Debug" }
+
+ project "Premake4"
+ targetname "premake4"
+ language "C"
+ kind "ConsoleApp"
+ flags { "No64BitChecks", "ExtraWarnings", "FatalWarnings" }
+ includedirs { "src/host/lua-5.1.2/src" }
+
+ files
+ {
+ "src/**.h", "src/**.c", "src/**.lua", "src/**.tmpl",
+ "tests/**.lua"
+ }
+
+ excludes
+ {
+ "src/premake.lua",
+ "src/host/lua-5.1.2/src/lua.c",
+ "src/host/lua-5.1.2/src/luac.c",
+ "src/host/lua-5.1.2/src/print.c",
+ "src/host/lua-5.1.2/**.lua",
+ "src/host/lua-5.1.2/etc/*.c"
+ }
+
+ configuration "Debug"
+ targetdir "bin/debug"
+ defines "_DEBUG"
+ flags { "Symbols" }
+
+ configuration "Release"
+ targetdir "bin/release"
+ defines "NDEBUG"
+ flags { "OptimizeSize" }
+
+ configuration "vs*"
+ defines { "_CRT_SECURE_NO_WARNINGS" }
--
--- A more thorough cleanup
+-- Define a "to" option to control where the files get generated. It is easiest,
+-- when I develop, to put the project files in the root project directory. But
+-- when deploying I want one directory per supported tool.
--
-
- function onclean()
- os.rmdir("bin")
- end
+
+ newoption {
+ trigger = "to",
+ value = "path",
+ description = "Set the output location for the generated files"
+ }