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

github.com/windirstat/premake-4.x.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstarkos <unknown>2008-12-27 16:33:10 +0300
committerstarkos <unknown>2008-12-27 16:33:10 +0300
commiteee828d06bbc9ccde7b8677a795af9bb3d2f2842 (patch)
treec5ad2fcc218ed664301d54c0a4ae9edd8f25d78f /premake4.lua
parente28d89ccf795acaa9979371c2a3613a13de4296e (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"
+ }