source: trunk/nv.lua @ 514

Last change on this file since 514 was 487, checked in by epyon, 9 years ago
File size: 4.8 KB
Line 
1NV_RUNTIME = NV_RUNTIME or "scrt"
2
3project "nv-core"
4        location (_ACTION.."/"..NV_RUNTIME)
5        language "C++"
6        kind "StaticLib"
7        includedirs { "." }
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"  }
9
10project "nv-lib"
11        location (_ACTION.."/"..NV_RUNTIME)
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"
19        location (_ACTION.."/"..NV_RUNTIME)
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"
27        location (_ACTION.."/"..NV_RUNTIME)
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"
35        location (_ACTION.."/"..NV_RUNTIME)
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"
43        location (_ACTION.."/"..NV_RUNTIME)
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"
51        location (_ACTION.."/"..NV_RUNTIME)
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"
59        location (_ACTION.."/"..NV_RUNTIME)
60        language "C++"
61        kind "StaticLib"
62        includedirs { "." }
63        files { "nv/rogue/**.hh",     "src/rogue/**.cc" }
64        links { "nv-core" }
65
66project "nv-io"
67        location (_ACTION.."/"..NV_RUNTIME)
68        language "C++"
69        kind "StaticLib"
70        includedirs { "." }
71        files { "nv/io/**.hh",     "src/io/**.cc" }
72        links { "nv-core" }
73
74project "nv-gfx"
75        location (_ACTION.."/"..NV_RUNTIME)
76        language "C++"
77        kind "StaticLib"
78        includedirs { "." }
79        files { "nv/gfx/**.hh",  "src/gfx/**.cc" }
80        links { "nv-core" }
81
82project "nv-engine"
83        location (_ACTION.."/"..NV_RUNTIME)
84        language "C++"
85        kind "StaticLib"
86        includedirs { "." }
87        files { "nv/engine/**.hh",  "src/engine/**.cc" }
88        links { "nv-core", "nv-lib", "nv-lua" }
89
90project "nv-image"
91        location (_ACTION.."/"..NV_RUNTIME)
92        language "C++"
93        kind "StaticLib"
94        includedirs { "." }
95        files { "nv/image/**.hh", "src/image/**.cc" }
96        links { "nv-core" }
97
98project "nv-formats"
99        location (_ACTION.."/"..NV_RUNTIME)
100        language "C++"
101        kind "StaticLib"
102        includedirs { "." }
103        files { "nv/formats/**.hh", "src/formats/**.cc" }
104        links { "nv-core", "nv-lib", "nv-io", "nv-gfx" }
105
106project "nv-gui"
107        location (_ACTION.."/"..NV_RUNTIME)
108        language "C++"
109        kind "StaticLib"
110        includedirs { "." }
111        files { "nv/gui/**.hh",     "src/gui/**.cc" }
112        links { "nv-core", "nv-lib", "nv-io", "nv-gfx", "nv-lua" }
113
114-- injection!
115solution( solution().name )
116        configuration "gmake"
117                if _ACTION == "gmake-clang" then
118                        buildoptions {
119                                "-std=c++1z",
120--                                -- on Mac OS X don't try to use old stdc++
121--                                "-stdlib=libc++",
122                                "-Weverything",
123                                -- math is so much easier with these
124                                "-Wno-gnu-anonymous-struct",
125                                "-Wno-nested-anon-types",
126                                -- obviously we don't care about C++98 compatibility
127                                "-Wno-c++98-compat",
128                                -- obviously we don't care about C++98 compatibility
129                                "-Wno-c++98-compat-pedantic",
130                                -- an evil one has to embrace
131                                "-Wno-float-equal",
132                                -- padding is a non-issue at the moment
133                                "-Wno-padded",
134                                -- we don't want to list all 128 keys of the key
135                                -- enum each time, right?
136                                "-Wno-switch-enum",
137                                -- yes, we need exit time destructors for libraries
138                                "-Wno-exit-time-destructors",
139                                -- same here
140                                "-Wno-global-constructors",
141                                -- no reasonable way to fix this with abstract
142                                -- interfaces.
143                                "-Wno-weak-vtables",
144                                -- this can be reenabled if I find a nice solution
145                                "-Wno-cast-align",
146                        }
147                        --buildoptions {
148            --                    "-stdlib=libc++"
149                        --}
150                else
151                        buildoptions { "-std=c++0x" }
152                end
153       
154        configuration { "windows", "gmake" }
155                linkoptions { "-Wl,--subsystem,windows" }
156--              linkoptions { "-mwindows" }
157
158        configuration "linux"
159                linkoptions { "-ldl" }
160
161        configuration "vs*"
162                defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" } --, "_ITERATOR_DEBUG_LEVEL=0", "_HAS_ITERATOR_DEBUGGING=0" }
163
164if _ACTION == "gmake-clang" then
165        premake.gcc.cc  = "clang"
166        premake.gcc.cxx = "clang++"
167        _ACTION = "gmake"
168end
169
170premake.action.add {
171        trigger = "gmake-clang",
172        description = "gmake file with clang overrides, needs 'make -R' to work",
173}
174
175if _ACTION == "clean" then
176        for action in premake.action.each() do
177                os.rmdir(action.trigger)
178        end
179end
Note: See TracBrowser for help on using the repository browser.