[466] | 1 | NV_RUNTIME = NV_RUNTIME or "scrt"
|
---|
| 2 |
|
---|
[320] | 3 | project "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 |
|
---|
| 10 | project "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 |
|
---|
| 18 | project "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 |
|
---|
| 26 | project "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 |
|
---|
| 34 | project "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 |
|
---|
| 42 | project "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 |
|
---|
| 50 | project "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 |
|
---|
| 58 | project "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 |
|
---|
| 66 | project "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 |
|
---|
| 74 | project "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 |
|
---|
| 82 | project "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 |
|
---|
[484] | 90 | project "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 |
|
---|
[320] | 98 | project "nv-formats"
|
---|
[466] | 99 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
[320] | 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 |
|
---|
| 106 | project "nv-gui"
|
---|
[466] | 107 | location (_ACTION.."/"..NV_RUNTIME)
|
---|
[320] | 108 | language "C++"
|
---|
| 109 | kind "StaticLib"
|
---|
| 110 | includedirs { "." }
|
---|
| 111 | files { "nv/gui/**.hh", "src/gui/**.cc" }
|
---|
[323] | 112 | links { "nv-core", "nv-lib", "nv-io", "nv-gfx", "nv-lua" }
|
---|
[320] | 113 |
|
---|
[120] | 114 | -- injection!
|
---|
| 115 | solution( solution().name )
|
---|
| 116 | configuration "gmake"
|
---|
[121] | 117 | if _ACTION == "gmake-clang" then
|
---|
| 118 | buildoptions {
|
---|
[486] | 119 | "-std=c++1z",
|
---|
[210] | 120 | -- -- on Mac OS X don't try to use old stdc++
|
---|
| 121 | -- "-stdlib=libc++",
|
---|
[121] | 122 | "-Weverything",
|
---|
[486] | 123 | -- math is so much easier with these
|
---|
| 124 | "-Wno-gnu-anonymous-struct",
|
---|
| 125 | "-Wno-nested-anon-types",
|
---|
[121] | 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.
|
---|
[323] | 143 | "-Wno-weak-vtables",
|
---|
| 144 | -- this can be reenabled if I find a nice solution
|
---|
| 145 | "-Wno-cast-align",
|
---|
[121] | 146 | }
|
---|
[210] | 147 | --buildoptions {
|
---|
| 148 | -- "-stdlib=libc++"
|
---|
| 149 | --}
|
---|
[121] | 150 | else
|
---|
| 151 | buildoptions { "-std=c++0x" }
|
---|
| 152 | end
|
---|
[323] | 153 | configuration { "windows", "gmake" }
|
---|
| 154 | linkoptions { "-mwindows" }
|
---|
[121] | 155 |
|
---|
[123] | 156 | configuration "linux"
|
---|
| 157 | linkoptions { "-ldl" }
|
---|
| 158 |
|
---|
[120] | 159 | configuration "vs*"
|
---|
[410] | 160 | defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" } --, "_ITERATOR_DEBUG_LEVEL=0", "_HAS_ITERATOR_DEBUGGING=0" }
|
---|
[120] | 161 |
|
---|
| 162 | if _ACTION == "gmake-clang" then
|
---|
| 163 | premake.gcc.cc = "clang"
|
---|
| 164 | premake.gcc.cxx = "clang++"
|
---|
| 165 | _ACTION = "gmake"
|
---|
| 166 | end
|
---|
| 167 |
|
---|
| 168 | premake.action.add {
|
---|
| 169 | trigger = "gmake-clang",
|
---|
| 170 | description = "gmake file with clang overrides, needs 'make -R' to work",
|
---|
| 171 | }
|
---|
| 172 |
|
---|
| 173 | if _ACTION == "clean" then
|
---|
| 174 | for action in premake.action.each() do
|
---|
| 175 | os.rmdir(action.trigger)
|
---|
| 176 | end
|
---|
[123] | 177 | end
|
---|