source: trunk/nv.lua @ 470

Last change on this file since 470 was 466, checked in by epyon, 10 years ago
  • support for separate runtime CRT build
  • wx fix for new gl headers
File size: 4.5 KB
RevLine 
[466]1NV_RUNTIME = NV_RUNTIME or "scrt"
2
[320]3project "nv-core"
[466]4        location (_ACTION.."/"..NV_RUNTIME)
[320]5        language "C++"
6        kind "StaticLib"
7        includedirs { "." }
[396]8        files { "nv/common.hh", "nv/base/**.hh", "nv/core/**.hh", "nv/stl/**.hh", "nv/interface/**.hh", "nv/detail/**.inc", "src/core/**.cc", "src/stl/**.cc"  }
[320]9
10project "nv-lib"
[466]11        location (_ACTION.."/"..NV_RUNTIME)
[320]12        language "C++"
13        kind "StaticLib"
14        includedirs { "." }
15        files { "nv/lib/**.hh", "nv/lib/**.inl", "nv/lib/**.inc", "src/lib/**.cc" }
16        links { "nv-core" }
17
18project "nv-curses"
[466]19        location (_ACTION.."/"..NV_RUNTIME)
[320]20        language "C++"
21        kind "StaticLib"
22        includedirs { "." }
23        files { "nv/curses/**.hh",  "src/curses/**.cc" }
24        links { "nv-core", "nv-lib" }
25
26project "nv-fmod"
[466]27        location (_ACTION.."/"..NV_RUNTIME)
[320]28        language "C++"
29        kind "StaticLib"
30        includedirs { "." }
31        files { "nv/fmod/**.hh",    "src/fmod/**.cc" }
32        links { "nv-core", "nv-lib" }
33
34project "nv-sdl"
[466]35        location (_ACTION.."/"..NV_RUNTIME)
[320]36        language "C++"
37        kind "StaticLib"
38        includedirs { "." }
39        files { "nv/sdl/**.hh",     "src/sdl/**.cc" }
40        links { "nv-core", "nv-lib" }
41
42project "nv-gl"
[466]43        location (_ACTION.."/"..NV_RUNTIME)
[320]44        language "C++"
45        kind "StaticLib"
46        includedirs { "." }
47        files { "nv/gl/**.hh",     "src/gl/**.cc" }
48        links { "nv-core", "nv-lib" }
49
50project "nv-lua"
[466]51        location (_ACTION.."/"..NV_RUNTIME)
[320]52        language "C++"
53        kind "StaticLib"
54        includedirs { "." }
55        files { "nv/lua/**.hh",     "src/lua/**.cc" }
56        links { "nv-core", "nv-lib" }
57
58project "nv-rogue"
[466]59        location (_ACTION.."/"..NV_RUNTIME)
[320]60        language "C++"
61        kind "StaticLib"
62        includedirs { "." }
63        files { "nv/rogue/**.hh",     "src/rogue/**.cc" }
64        links { "nv-core" }
65
66project "nv-io"
[466]67        location (_ACTION.."/"..NV_RUNTIME)
[320]68        language "C++"
69        kind "StaticLib"
70        includedirs { "." }
71        files { "nv/io/**.hh",     "src/io/**.cc" }
72        links { "nv-core" }
73
74project "nv-gfx"
[466]75        location (_ACTION.."/"..NV_RUNTIME)
[320]76        language "C++"
77        kind "StaticLib"
78        includedirs { "." }
79        files { "nv/gfx/**.hh",  "src/gfx/**.cc" }
80        links { "nv-core" }
81
82project "nv-engine"
[466]83        location (_ACTION.."/"..NV_RUNTIME)
[320]84        language "C++"
85        kind "StaticLib"
86        includedirs { "." }
87        files { "nv/engine/**.hh",  "src/engine/**.cc" }
[323]88        links { "nv-core", "nv-lib", "nv-lua" }
[320]89
90project "nv-formats"
[466]91        location (_ACTION.."/"..NV_RUNTIME)
[320]92        language "C++"
93        kind "StaticLib"
94        includedirs { "." }
95        files { "nv/formats/**.hh", "src/formats/**.cc" }
96        links { "nv-core", "nv-lib", "nv-io", "nv-gfx" }
97
98project "nv-gui"
[466]99        location (_ACTION.."/"..NV_RUNTIME)
[320]100        language "C++"
101        kind "StaticLib"
102        includedirs { "." }
103        files { "nv/gui/**.hh",     "src/gui/**.cc" }
[323]104        links { "nv-core", "nv-lib", "nv-io", "nv-gfx", "nv-lua" }
[320]105
[120]106-- injection!
107solution( solution().name )
108        configuration "*"
109                includedirs { os.getenv("GLM_PATH") }
110        configuration "gmake"
[121]111                if _ACTION == "gmake-clang" then
112                        buildoptions {
113                                "-std=c++11",
[210]114--                                -- on Mac OS X don't try to use old stdc++
115--                                "-stdlib=libc++",
[121]116                                "-Weverything",
117                                -- obviously we don't care about C++98 compatibility
118                                "-Wno-c++98-compat",
119                                -- obviously we don't care about C++98 compatibility
120                                "-Wno-c++98-compat-pedantic",
121                                -- an evil one has to embrace
122                                "-Wno-float-equal",
123                                -- padding is a non-issue at the moment
124                                "-Wno-padded",
125                                -- we don't want to list all 128 keys of the key
126                                -- enum each time, right?
127                                "-Wno-switch-enum",
128                                -- yes, we need exit time destructors for libraries
129                                "-Wno-exit-time-destructors",
130                                -- same here
131                                "-Wno-global-constructors",
132                                -- no reasonable way to fix this with abstract
133                                -- interfaces.
[323]134                                "-Wno-weak-vtables",
135                                -- this can be reenabled if I find a nice solution
136                                "-Wno-cast-align",
[121]137                        }
[210]138                        --buildoptions {
139            --                    "-stdlib=libc++"
140                        --}
[121]141                else
142                        buildoptions { "-std=c++0x" }
143                end
[323]144        configuration { "windows", "gmake" }
145                linkoptions { "-mwindows" }
[121]146
[123]147        configuration "linux"
148                linkoptions { "-ldl" }
149
[120]150        configuration "vs*"
[410]151                defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" } --, "_ITERATOR_DEBUG_LEVEL=0", "_HAS_ITERATOR_DEBUGGING=0" }
[120]152
153if _ACTION == "gmake-clang" then
154        premake.gcc.cc  = "clang"
155        premake.gcc.cxx = "clang++"
156        _ACTION = "gmake"
157end
158
159premake.action.add {
160        trigger = "gmake-clang",
161        description = "gmake file with clang overrides, needs 'make -R' to work",
162}
163
164if _ACTION == "clean" then
165        for action in premake.action.each() do
166                os.rmdir(action.trigger)
167        end
[123]168end
Note: See TracBrowser for help on using the repository browser.