b50aaa8d9e
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
69 lines
1.5 KiB
Python
69 lines
1.5 KiB
Python
#!/usr/bin/python
|
|
import os
|
|
|
|
# Configuration variables
|
|
CONFIG_VERSION = 6.0
|
|
CONFIG_DEBUG = True
|
|
#CONFIG_TESTING = False
|
|
|
|
|
|
# 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")
|
|
|
|
|
|
# Class to store configuration data
|
|
class Config:
|
|
# Set up reasonable defaults
|
|
def __init__(self):
|
|
self.VERSION = CONFIG_VERSION
|
|
self.DEBUG = CONFIG_DEBUG
|
|
self.CCFLAGS = CONFIG_CCFLAGS
|
|
self.reset();
|
|
|
|
def package(self, name):
|
|
env.ParseConfig("pkg-config --cflags --libs %s" % name)
|
|
|
|
def reconfigure(self):
|
|
env.Replace( CCFLAGS = self.CCFLAGS )
|
|
if self.TEST == True:
|
|
env.Append( CCFLAGS = [ "-DCONFIG_TEST" ])
|
|
|
|
def reset(self, TEST = False, ALL = False):
|
|
self.AUDIO = ALL
|
|
self.CALLBACK = ALL
|
|
self.DATABASE = ALL
|
|
self.DECK = ALL
|
|
self.FILE = ALL
|
|
self.FILTER = ALL
|
|
self.IDLE = ALL
|
|
self.LIBRARY = ALL
|
|
self.PLAYLIST = ALL
|
|
self.PLAYQUEUE = ALL
|
|
self.TEST = TEST
|
|
self.reconfigure()
|
|
|
|
CONFIG = Config()
|
|
Export("env", "CONFIG")
|
|
|
|
|
|
# Import SConscript files
|
|
include = SConscript("include/Sconscript")
|
|
design = SConscript("design/Sconscript")
|
|
|
|
#gui = SConscript("gui/Sconscript")
|
|
|
|
#Default("gui")
|
|
#if CONFIG_TESTING == True:
|
|
# tests = SConscript("tests/Sconscript")
|
|
# Depends(gui, tests)
|
|
|
|
tests = SConscript("tests/Sconscript")
|
|
Default("tests")
|