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:34:58 +0300
committerstarkos <none@none>2008-12-27 16:34:58 +0300
commit1f34f0c43f611aff51f4e3514bed9483d3614120 (patch)
tree766231f69c6f778d46c1451720ec6a6f4f3f80d4 /premake4.lua
parenta883e7f51e42116daa46d88189714590276e2d1f (diff)
Add --to option to control output location
Diffstat (limited to 'premake4.lua')
-rw-r--r--premake4.lua42
1 files changed, 29 insertions, 13 deletions
diff --git a/premake4.lua b/premake4.lua
index 058077e..92302be 100644
--- a/premake4.lua
+++ b/premake4.lua
@@ -9,12 +9,30 @@ if (_ACTION == "vs2002" or _ACTION == "vs2003") then
end
+
+--
+-- Use the --to=path option to control where the project files get generated. I use
+-- this to create project files for each supported toolset, each in their own folder,
+-- in preparation for deployment.
+--
+
+ newoption {
+ trigger = "to",
+ value = "path",
+ description = "Set the output location for the generated files"
+ }
+
+
+
--
--- Define the project files.
+-- 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
+-- worry about the /scripts argument and all that.
--
solution "Premake4"
configurations { "Release", "Debug" }
+ location ( _OPTIONS["to"] )
project "Premake4"
targetname "premake4"
@@ -22,6 +40,7 @@ end
kind "ConsoleApp"
flags { "No64BitChecks", "ExtraWarnings", "FatalWarnings" }
includedirs { "src/host/lua-5.1.2/src" }
+ location ( _OPTIONS["to"] )
files
{
@@ -47,7 +66,7 @@ end
configuration "Release"
targetdir "bin/release"
defines "NDEBUG"
- flags { "OptimizeSize" }
+ flags { "OptimizeSize", "NoFramePointer" }
configuration "vs*"
defines { "_CRT_SECURE_NO_WARNINGS" }
@@ -56,19 +75,16 @@ end
--
--- 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.
+-- A more thorough cleanup.
--
- newoption {
- trigger = "to",
- value = "path",
- description = "Set the output location for the generated files"
- }
-
-
-
+ if _ACTION == "clean" then
+ os.rmdir("bin")
+ os.rmdir("build")
+ end
+
+
+
--
-- "Compile" action compiles scripts to bytecode and embeds into a static
-- data buffer in src/host/bytecode.c.