mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-11 15:21:29 +00:00
updated nmake2, premake config improvements
This commit is contained in:
parent
bef7d504ae
commit
80957f895b
2
nmake2
2
nmake2
@ -1 +1 @@
|
||||
Subproject commit 56f6cfcbc622c6cfeed2e4a8abb66f28d3f0d303
|
||||
Subproject commit 3d04ffed77947de5c16c044f4c1e47c812ba3ec6
|
||||
58
premake5.lua
58
premake5.lua
@ -1,19 +1,13 @@
|
||||
|
||||
--require("nmake")
|
||||
--import .mak file generation module
|
||||
require("nmake2")
|
||||
|
||||
newoption {
|
||||
trigger = "with-lto",
|
||||
description = "Build with link time optimization"
|
||||
}
|
||||
|
||||
workspace "isle"
|
||||
language "C++"
|
||||
configurations { "Debug", "Release" }
|
||||
startproject "isle"
|
||||
location "build"
|
||||
symbols "Full"
|
||||
warnings "Extra"
|
||||
warnings "Extra" --flag /W3 or /W4
|
||||
symbols "on"
|
||||
|
||||
filter { "system:windows" }
|
||||
@ -48,15 +42,17 @@ workspace "isle"
|
||||
"macosx-amd64",
|
||||
}
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines { "DEBUG" }
|
||||
filter { "configurations:Vanilla" }
|
||||
defines { "VANILLA_DEFINES" }
|
||||
|
||||
filter "configurations:not Debug"
|
||||
filter { "configurations:Debug" }
|
||||
--TODO: check if "DEBUG" define is also needed
|
||||
defines { "_DEBUG" }
|
||||
optimize "debug"
|
||||
|
||||
filter { "configurations:not Debug" }
|
||||
defines { "NDEBUG" }
|
||||
optimize "Speed"
|
||||
if(_OPTIONS["with-lto"]) then
|
||||
flags { "LinkTimeOptimization" }
|
||||
end
|
||||
|
||||
filter { "platforms:win*" }
|
||||
system "windows"
|
||||
@ -102,35 +98,45 @@ end
|
||||
|
||||
project "isle"
|
||||
kind "WindowedApp"
|
||||
targetname "isle"
|
||||
targetname "ISLE"
|
||||
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
|
||||
links { "lego1" }
|
||||
resincludedirs { "." }
|
||||
dependson { "lego1" }
|
||||
staticruntime "libc"
|
||||
|
||||
--libdirs { "bin/%{cfg.platform}/%{cfg.buildcfg}" }
|
||||
|
||||
files { addSrcFiles("ISLE") }
|
||||
files { addSrcFiles("ISLE/res") }
|
||||
|
||||
includedirs { "LEGO1" }
|
||||
|
||||
filter { "action:nmake2" }
|
||||
--flag /ML or /MLd
|
||||
staticruntime "libc"
|
||||
|
||||
filter { "action:not nmake2" }
|
||||
--flag /MT or /MTd
|
||||
staticruntime "on"
|
||||
|
||||
filter { "platforms:win*" }
|
||||
links { "dsound", "advapi32", "user32", "Gdi32", "Winmm" }
|
||||
links { "dsound", "advapi32", "user32", "gdi32", "winmm" }
|
||||
--flag language for rc.exe
|
||||
resoptions { "/l 0x409" }
|
||||
|
||||
filter "configurations:Vanilla"
|
||||
defines { "VANILLA_DEFINES" }
|
||||
--this flags looks like default on,
|
||||
--but still need some tweaks to nmake2 module to make sure it active
|
||||
--filter { "configurations:Debug" }
|
||||
-- buildoptions { "/Gm" }
|
||||
-- linkoptions { "/incremental:yes" }
|
||||
|
||||
--reset all filters
|
||||
filter {}
|
||||
|
||||
|
||||
project "lego1"
|
||||
--TODO: create mxomni project and make static linking configuration
|
||||
--kind "StaticLib"
|
||||
kind "SharedLib"
|
||||
targetname "lego1"
|
||||
targetname "LEGO1"
|
||||
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
|
||||
--flag /MT or /MTd
|
||||
staticruntime "on"
|
||||
|
||||
files { addSrcFiles("LEGO1") }
|
||||
@ -138,8 +144,4 @@ project "lego1"
|
||||
filter { "platforms:win*" }
|
||||
links { "dsound", "advapi32", "user32", "Gdi32", "Winmm" }
|
||||
|
||||
filter "configurations:Vanilla"
|
||||
defines { "VANILLA_DEFINES" }
|
||||
|
||||
filter {}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user