-
Notifications
You must be signed in to change notification settings - Fork 36
/
build.hancho
57 lines (44 loc) · 1.72 KB
/
build.hancho
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
import glob
hancho.base_rules = hancho.repo("{hancho_dir}/base_rules.hancho")
hancho.metrolib = hancho.repo("symlinks/metrolib/build.hancho")
hancho.glad = hancho.repo("symlinks/third_party/glad.hancho")
hancho.imgui = hancho.repo("symlinks/third_party/imgui.hancho")
hancho.config.defines = ["CONFIG_DEBUG"]
hancho.config.includes = ["src", "symlinks", "symlinks/metrolib"]
libs = [
hancho.metrolib.libappbase,
hancho.metrolib.libaudio,
hancho.metrolib.libcore,
hancho.metrolib.libgameboy,
hancho.glad.lib,
hancho.imgui.lib,
]
gateboy_app = hancho(
hancho.base_rules.cpp_bin,
in_srcs = [glob.glob("src/GateBoyLib/*.cpp"), "src/GateBoyApp/GateBoyApp.cpp"],
in_libs = libs,
sys_libs = ["-lSDL2", "-ldl", "-lpthread"],
out_bin = "gateboy_app",
)
metroboy_app = hancho(
hancho.base_rules.cpp_bin,
in_srcs = [glob.glob("src/MetroBoyLib/*.cpp"), "src/MetroBoyApp/MetroBoyApp.cpp"],
in_libs = libs,
sys_libs = ["-lSDL2"],
out_bin = "metroboy_app"
)
"""
# Windows build
################################################################################
# we define SIM_AUDIO in config.h otherwise VSCode gets confused about what's
# enabled and what's not
#-DSIM_AUDIO
# not having NDEBUG turns assert()s on
build_mode = /O2 /D CONFIG_RELEASE /D NDEBUG /D _CRT_SECURE_NO_WARNINGS
#build_mode = /D CONFIG_RELEASE /D _CRT_SECURE_NO_WARNINGS
#build_mode = /D CONFIG_DEBUG /D _CRT_SECURE_NO_WARNINGS
default_gpp = CL.exe /nologo /std:c++latest /EHsc /showIncludes /W4 /WX /diagnostics:caret /fp:fast /arch:AVX2 /sdl- /Gm- /GS- /Z7 /DEBUG /FS /GL
default_gcc = CL.exe /nologo /std:c17 /showIncludes
default_includes = /Isrc /Isymlinks /Isymlinks/glad
global_libs = src/SDL2.lib
"""