Added tundra build files
This commit is contained in:
parent
d119cfccc8
commit
3d3e9e63bc
48
tundra.lua
Normal file
48
tundra.lua
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
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", "\"/DOBJECT_DIR=$(OBJECTDIR:#)\"",
|
||||||
|
{ "/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.
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
ReplaceEnv = {
|
||||||
|
["OBJCCOM"] = "dummy", -- no ObjC compiler
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local macosx = {
|
||||||
|
Env = {
|
||||||
|
CCOPTS = {
|
||||||
|
"-Wpedantic", "-Werror", "-Wall",
|
||||||
|
{ "-O0", "-g"; Config = "*-*-debug" },
|
||||||
|
{ "-O3"; Config = "*-*-release" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
Frameworks = { "Cocoa" },
|
||||||
|
}
|
||||||
|
|
||||||
|
Build {
|
||||||
|
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" },},
|
||||||
|
},
|
||||||
|
|
||||||
|
Units = {
|
||||||
|
"units.lua",
|
||||||
|
},
|
||||||
|
}
|
40
units.lua
Normal file
40
units.lua
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
StaticLibrary {
|
||||||
|
Name = "minifb",
|
||||||
|
|
||||||
|
Env = { CPPPATH = { "include", }, },
|
||||||
|
|
||||||
|
Sources = FGlob {
|
||||||
|
Dir = "src",
|
||||||
|
Extensions = { ".cpp", ".c", ".h", ".s", ".m" },
|
||||||
|
Filters = {
|
||||||
|
{ Pattern = "[/\\]win32[/\\]"; Config = "win32-*" },
|
||||||
|
{ Pattern = "[/\\]macosx[/\\]"; Config = "mac*-*" },
|
||||||
|
{ Pattern = "[/\\]unix[/\\]"; Config = { "freebsd*-*", "linux*-*" } },
|
||||||
|
},
|
||||||
|
|
||||||
|
Recursive = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
Propagate = {
|
||||||
|
Libs = {
|
||||||
|
"user32.lib"; Config = "win32-*",
|
||||||
|
"ws2_32.lib"; Config = "win32-*",
|
||||||
|
"gdi32.lib"; Config = "win32-*",
|
||||||
|
},
|
||||||
|
|
||||||
|
Frameworks = { "Cocoa" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
Program {
|
||||||
|
|
||||||
|
Name = "noise",
|
||||||
|
|
||||||
|
Env = { CPPPATH = { "include", }, },
|
||||||
|
|
||||||
|
Depends = { "minifb" },
|
||||||
|
Sources = { "tests/noise.c" },
|
||||||
|
}
|
||||||
|
|
||||||
|
Default "noise"
|
Loading…
Reference in New Issue
Block a user