336024bae9
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
38 lines
829 B
Python
38 lines
829 B
Python
#!/usr/bin/python
|
|
import os
|
|
|
|
# Configuration variables
|
|
CONFIG_VERSION = 6.0
|
|
CONFIG_DEBUG = True
|
|
|
|
|
|
# Set up default environment
|
|
CONFIG_CCFLAGS = [ "-O2" ]
|
|
if CONFIG_DEBUG == True:
|
|
CONFIG_CCFLAGS = [ "-Wall", "-Werror", "-g", "-DCONFIG_DEBUG" ]
|
|
|
|
env = Environment( CCFLAGS = CONFIG_CCFLAGS )
|
|
env.Append(CPPPATH = os.path.abspath("include"))
|
|
env.Append(CXXCOMSTR = "C++ $TARGET")
|
|
env.Append(LINKCOMSTR = "Linking $TARGET")
|
|
|
|
|
|
def use_package(name):
|
|
env.ParseConfig("pkg-config --cflags --libs %s" % name)
|
|
|
|
Export("env", "use_package", "CONFIG_DEBUG", "CONFIG_VERSION")
|
|
|
|
|
|
include = SConscript("include/Sconscript")
|
|
|
|
lib = SConscript("lib/Sconscript")
|
|
Export("lib")
|
|
|
|
tests = SConscript("tests/Sconscript")
|
|
|
|
gui = SConscript("gui/Sconscript")
|
|
|
|
ocarina = env.Program("bin/ocarina", lib + gui)
|
|
Default(ocarina)
|
|
Clean(ocarina, "bin/")
|