-
Notifications
You must be signed in to change notification settings - Fork 1
/
premake5.lua
100 lines (83 loc) · 2.54 KB
/
premake5.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
solution ( "actor" )
configurations { "Release", "Debug" }
platforms { "x64" }
if _ACTION == "clean" then
os.rmdir(".vs")
os.rmdir("bin")
os.remove("actor.VC.db")
os.remove("actor.sln")
os.remove("actor.vcxproj")
os.remove("actor.vcxproj.filters")
os.remove("actor.vcxproj.user")
os.remove("actor.make")
os.remove("test.vcxproj")
os.remove("test.vcxproj.filters")
os.remove("test.vcxproj.user")
os.remove("test.make")
os.remove("Makefile")
return
end
-- A project defines one build target
project ( "actor" )
kind ( "SharedLib" )
language ( "C" )
targetname ("actor")
files { "./*.h", "./*.c" }
excludes { "./test.c" }
defines { "_UNICODE", "ACTOR_BUILD_DLL" }
staticruntime "On"
configuration ( "Release" )
optimize "On"
objdir ( "./bin/tmp" )
targetdir ( "./bin" )
defines { "NDEBUG", "_NDEBUG" }
configuration ( "Debug" )
symbols "On"
objdir ( "./bin/tmp" )
targetdir ( "./bin" )
defines { "DEBUG", "_DEBUG" }
configuration ( "vs*" )
defines { "WIN32", "_WIN32", "_WINDOWS",
"_CRT_SECURE_NO_WARNINGS", "_CRT_SECURE_NO_DEPRECATE",
"_CRT_NONSTDC_NO_DEPRECATE", "_WINSOCK_DEPRECATED_NO_WARNINGS" }
configuration ( "gmake" )
warnings "Default" --"Extra"
configuration { "gmake", "macosx" }
defines { "__APPLE__", "__MACH__", "__MRC__", "macintosh" }
configuration { "gmake", "linux" }
defines { "__linux__" }
links { "pthread" }
configuration { "gmake", "bsd" }
defines { "__BSD__" }
links { "pthread" }
-- A project defines one build target
project ( "test" )
kind ( "ConsoleApp" )
language ( "C" )
targetname ("test")
files { "./test.c" }
defines { "_UNICODE" }
links { "actor" }
staticruntime "On"
configuration ( "Release" )
optimize "On"
objdir ( "./bin/tmp" )
targetdir ( "./bin" )
defines { "NDEBUG", "_NDEBUG" }
configuration ( "Debug" )
symbols "On"
objdir ( "./bin/tmp" )
targetdir ( "./bin" )
defines { "DEBUG", "_DEBUG" }
configuration ( "vs*" )
defines { "WIN32", "_WIN32", "_WINDOWS",
"_CRT_SECURE_NO_WARNINGS", "_CRT_SECURE_NO_DEPRECATE",
"_CRT_NONSTDC_NO_DEPRECATE", "_WINSOCK_DEPRECATED_NO_WARNINGS" }
configuration ( "gmake" )
warnings "Default" --"Extra"
configuration { "gmake", "macosx" }
defines { "__APPLE__", "__MACH__", "__MRC__", "macintosh" }
configuration { "gmake", "linux" }
defines { "__linux__" }
configuration { "gmake", "bsd" }
defines { "__BSD__" }