forked from swolegoal/weeb2psp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConstruct
More file actions
33 lines (24 loc) · 807 Bytes
/
Copy pathSConstruct
File metadata and controls
33 lines (24 loc) · 807 Bytes
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
from sconutils import runpretty
env = Environment()
env.Append(CCFLAGS="-O2 -Wall -Wextra")
dbg = ARGUMENTS.get("debug", 0)
afl = ARGUMENTS.get("afl", 0)
iniprint = ARGUMENTS.get("iniprint", 0)
Repository("/usr/include", "src")
if int(afl):
dbg = "1"
env.Replace(CC="afl-gcc")
if int(dbg):
env.Append(CCFLAGS="-g")
if int(iniprint):
env.Append(CPPDEFINES=["DEBUG_PRINT"])
# Build C lexer state machines
runpretty("re2c -i -W --verbose src/re/weebparse.c -o src/weebparse.c")
# Program Targets
weeb2psp = env.Program(
target="build/weeb2psp",
source=["src/weeb2psp.c", "src/weebutil.c", "src/weebfiles.c"],
)
parsebed_src = ["src/parsebed.c", "src/weebparse.c", "src/weebutil.c"]
parsebed = env.Program(target="build/parsebed", source=parsebed_src)
Default("build/weeb2psp")