Run python 'black' on SConstruct
This commit is contained in:
26
SConstruct
26
SConstruct
@@ -10,11 +10,23 @@ build_dir = "build/default/"
|
||||
src_dir = "src/"
|
||||
|
||||
program_sources = ["src/main.c"]
|
||||
lib_srcs = ["src/parse.c", "src/memory.c", "src/builtins.c", "src/evaluate.c", "src/utility.c", "src/state.c"]
|
||||
lib_srcs = [
|
||||
"src/parse.c",
|
||||
"src/memory.c",
|
||||
"src/builtins.c",
|
||||
"src/evaluate.c",
|
||||
"src/utility.c",
|
||||
"src/state.c",
|
||||
]
|
||||
lib_includes = ["src/"]
|
||||
|
||||
|
||||
test_srcs = ["test/test_parse.c", "test/test_utility.c", "test/test_state.c", "test/test_e2e.c"]
|
||||
test_srcs = [
|
||||
"test/test_parse.c",
|
||||
"test/test_utility.c",
|
||||
"test/test_state.c",
|
||||
"test/test_e2e.c",
|
||||
]
|
||||
test_lib_srcs = ["third-party/unity/src/unity.c"]
|
||||
test_lib_includes = ["third-party/unity/src/"]
|
||||
|
||||
@@ -23,8 +35,11 @@ test_lib_includes = ["third-party/unity/src/"]
|
||||
#
|
||||
|
||||
VariantDir(build_dir, ".", duplicate=0)
|
||||
env = Environment(CPPPATH=lib_includes, COMPILATIONDB_USE_ABSPATH=True, CCFLAGS=["-ggdb", "-O0"])
|
||||
env.Tool('compilation_db')
|
||||
# Minimization flags for later: ["-Oz", "-flto", "-ffunction-sections", "-fdata-sections", "-Wl,--gc-sections"]
|
||||
env = Environment(
|
||||
CPPPATH=lib_includes, COMPILATIONDB_USE_ABSPATH=True, CCFLAGS=["-ggdb", "-O0"]
|
||||
)
|
||||
env.Tool("compilation_db")
|
||||
env.CompilationDatabase()
|
||||
|
||||
test_env = env.Clone()
|
||||
@@ -43,7 +58,8 @@ env.Program(build_dir + "uclisp", lib_objs + program_sources)
|
||||
# Generate unit test executables
|
||||
|
||||
test_lib_objs = [
|
||||
test_env.Object(build_dir + p, CPPPATH=lib_includes + test_lib_includes) for p in test_lib_srcs
|
||||
test_env.Object(build_dir + p, CPPPATH=lib_includes + test_lib_includes)
|
||||
for p in test_lib_srcs
|
||||
]
|
||||
test_deps = test_lib_objs + lib_objs
|
||||
tests = [test_env.Program(build_dir + p, [p] + test_deps) for p in test_srcs]
|
||||
|
||||
Reference in New Issue
Block a user