-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlift_build.py
56 lines (41 loc) · 1.41 KB
/
lift_build.py
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
import os
from lift.lift_class import LiftClass
import lift.print_color as Out
TOGGLE_DEBUG = True
def setup(lift):
Out.print_debug(". Running lift_build.py->setup(lift)")
# Project settings
lift.app_name = "app"
lift.dir_root = os.getcwd();
lift.dir_source = "/src"
lift.dir_build = "/build"
lift.dir_lib = ""
lift.dir_include = ""
lift.libs = ""
# Compiler settings
lift.compiler = "clang"
lift.flags_debug = lift.flags_default("debug")
lift.flags_release = lift.flags_default("release")
# Incremental compilation settings
lift.incremental_compilation = True
# Compilation & Linker settings
lift.threads = 8
# Compiler formatting
lift.str_format_compiler = "{FLAGS} -c '{C_FILE}' -o '{O_FILE}'"
lift.str_format_linker = "{DIR_LIB} {LIBS} {DIR_INCLUDE} {FLAGS} {OBJECTS} -o '{APP_NAME}'"
return lift
def build(lift, mode):
Out.print_debug(f". Running lift_build.py->build({mode})")
lift.build(mode)
def run(lift):
Out.print_debug(". Running lift_build.py->run()")
args = [""]
lift.run(args)
def clean(lift):
Out.print_debug(". Running lift_build.py->clean()")
lift.clean()
def test(lift):
Out.print_debug(". Running lift_build.py->test()")
lift.test()
if __name__ == "__main__":
Out.print_error("This scipt is not designed do be executed with Python itself, its part of the lift build system")