source: trunk/nv.lua @ 482

Last change on this file since 482 was 471, checked in by epyon, 10 years ago
  • full math library
  • GLM dependency removed
File size: 4.4 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-formats"
91        location (_ACTION.."/"..NV_RUNTIME)
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"
99        location (_ACTION.."/"..NV_RUNTIME)
100        language "C++"
101        kind "StaticLib"
102        includedirs { "." }
103        files { "nv/gui/**.hh",     "src/gui/**.cc" }
104        links { "nv-core", "nv-lib", "nv-io", "nv-gfx", "nv-lua" }
105
106-- injection!
107solution( solution().name )
108        configuration "gmake"
109                if _ACTION == "gmake-clang" then
110                        buildoptions {
111                                "-std=c++11",
112--                                -- on Mac OS X don't try to use old stdc++
113--                                "-stdlib=libc++",
114                                "-Weverything",
115                                -- obviously we don't care about C++98 compatibility
116                                "-Wno-c++98-compat",
117                                -- obviously we don't care about C++98 compatibility
118                                "-Wno-c++98-compat-pedantic",
119                                -- an evil one has to embrace
120                                "-Wno-float-equal",
121                                -- padding is a non-issue at the moment
122                                "-Wno-padded",
123                                -- we don't want to list all 128 keys of the key
124                                -- enum each time, right?
125                                "-Wno-switch-enum",
126                                -- yes, we need exit time destructors for libraries
127                                "-Wno-exit-time-destructors",
128                                -- same here
129                                "-Wno-global-constructors",
130                                -- no reasonable way to fix this with abstract
131                                -- interfaces.
132                                "-Wno-weak-vtables",
133                                -- this can be reenabled if I find a nice solution
134                                "-Wno-cast-align",
135                        }
136                        --buildoptions {
137            --                    "-stdlib=libc++"
138                        --}
139                else
140                        buildoptions { "-std=c++0x" }
141                end
142        configuration { "windows", "gmake" }
143                linkoptions { "-mwindows" }
144
145        configuration "linux"
146                linkoptions { "-ldl" }
147
148        configuration "vs*"
149                defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" } --, "_ITERATOR_DEBUG_LEVEL=0", "_HAS_ITERATOR_DEBUGGING=0" }
150
151if _ACTION == "gmake-clang" then
152        premake.gcc.cc  = "clang"
153        premake.gcc.cxx = "clang++"
154        _ACTION = "gmake"
155end
156
157premake.action.add {
158        trigger = "gmake-clang",
159        description = "gmake file with clang overrides, needs 'make -R' to work",
160}
161
162if _ACTION == "clean" then
163        for action in premake.action.each() do
164                os.rmdir(action.trigger)
165        end
166end
Note: See TracBrowser for help on using the repository browser.