-
Notifications
You must be signed in to change notification settings - Fork 82
/
tundra.lua
77 lines (67 loc) · 2.27 KB
/
tundra.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
require "tundra.syntax.glob"
local native = require('tundra.native')
local win32 = {
Env = {
GENERATE_PDB = "1",
CCOPTS = {
"/FS",
"/W4",
"/WX", "/I.", "/D_CRT_SECURE_NO_WARNINGS",
{ "/Od"; Config = "*-*-debug" },
{ "/O2"; Config = "*-*-release" },
},
PROGOPTS = {
"/INCREMENTAL:NO"-- Disable incremental linking. It doesn't work properly in our use case (nearly all code in libs) and causes log spam.
},
},
}
local macosx = {
Env = {
CCOPTS = {
"-Wpedantic", "-Werror", "-Wall",
{ "-O0", "-g"; Config = "*-*-debug" },
{ "-O3"; Config = "*-*-release" },
},
},
Frameworks = { "Cocoa" },
}
local x11 = {
Env = {
CPPPATH = { "/usr/include", },
CCOPTS = {
"-Wpedantic", "-Werror", "-Wall",
{ "-O0", "-g"; Config = "*-*-debug" },
{ "-O3"; Config = "*-*-release" },
},
},
}
Build {
IdeGenerationHints = {
Msvc = {
PlatformMappings = {
['win32-msvc'] = 'Win32',
['win32-msvc'] = 'Win64',
},
FullMappings = {
['win32-msvc-debug-default'] = { Config='Debug', Platform='Win32' },
['win32-msvc-production-default'] = { Config='Production', Platform='Win32' },
['win32-msvc-release-default'] = { Config='Release', Platform='Win32' },
['win64-msvc-debug-default'] = { Config='Debug', Platform='Win64' },
['win64-msvc-production-default'] = { Config='Production', Platform='Win64' },
['win64-msvc-release-default'] = { Config='Release', Platform='Win64' },
},
},
MsvcSolutions = { ['minfb.sln'] = { } },
},
Configs = {
Config { Name = "win32-msvc", Inherit = win32, Tools = { "msvc" }, SupportedHosts = { "windows" }, },
Config { Name = "win64-msvc", Inherit = win32, Tools = { "msvc" }, SupportedHosts = { "windows" }, },
Config { Name = "macosx-clang", Inherit = macosx, Tools = { "clang-osx" }, SupportedHosts = { "macosx" },},
Config { Name = "x11-gcc", Inherit = x11, Tools = { "gcc" }, SupportedHosts = { "linux", "freebsd" },},
Config { Name = "wayland-gcc", Inherit = x11, Tools = { "gcc" }, SupportedHosts = { "linux" },},
-- Config { Name = "x11-clang", Inherit = x11, Tools = { "clang" }, SupportedHosts = { "linux", "freebsd" },},
},
Units = {
"units.lua",
},
}