I'm taking a break from gui code to clean up the build system and update my unit tests. This patch updates how code is built, and reworks my "print" test to test version number instead. Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
35 lines
791 B
Python
35 lines
791 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")
|
|
|
|
tests = SConscript("tests/Sconscript")
|
|
|
|
gui = SConscript("gui/Sconscript")
|
|
|
|
ocarina = env.Program("bin/ocarina", lib + gui)
|
|
Default(ocarina)
|