-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake4.lua
54 lines (47 loc) · 1.4 KB
/
premake4.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
-- Premake script.
-- Generate Makefile (for Athena, Linux, Cygwin, Mac OS X):
-- premake4 --os=linux gmake
-- Generate Visual Studio (not necessary if you add new files from Visual Studio itself):
-- premake4 --os=windows vs2010
assignment = "boids"
solution(assignment)
configurations { "Debug", "Release" }
if not os.is("windows") then
buildoptions{"-std=c++0x"}
else
buildoptions{"/D WIN32"}
end
configuration { "Debug" }
targetdir "debug"
configuration { "Release" }
targetdir "release"
project(assignment)
language "C++"
kind "ConsoleApp"
files { "src/**.cpp", "src/**.h" }
includedirs {"vecmath/include"}
libdirs {"lib"}
if not os.is("windows") then
linkoptions {[[`if [ "\`uname\`" = "Darwin" ]; then echo "-framework OpenGL -framework GLUT -lRK4_mac"; else echo "-lGL -lGLU -lglut -lRK4"; fi;`]]}
else
links {"freeglut"}
includedirs {"include"}
end
links {"vecmath"}
configuration { "Debug*" }
defines { "_DEBUG", "DEBUG" }
flags { "Symbols" }
if not os.is("windows") then
postbuildcommands {"cp debug/" .. assignment .. " " .. assignment}
else
links {"RK4D"}
end
configuration { "Release*" }
defines { "NDEBUG" }
flags { "Optimize" }
if not os.is("windows") then
postbuildcommands {"cp release/" .. assignment .. " " .. assignment}
else
links {"RK4"}
end
include("vecmath")