83118b3e8d
Time to start Ocarina 6.1! Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
56 lines
1.4 KiB
Python
56 lines
1.4 KiB
Python
#!/usr/bin/python
|
|
import os
|
|
|
|
# Configuration variables
|
|
CONFIG_VERSION = 6.1
|
|
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/")
|
|
|
|
|
|
def ocarina_release(target, source, env):
|
|
o_vers = "ocarina-%s" % CONFIG_VERSION
|
|
|
|
os.popen("git archive --prefix=%s/ -o %s.tar.gz HEAD" % (o_vers, o_vers))
|
|
print os.popen("sha1sum %s.tar.gz" % o_vers).read()
|
|
|
|
Command("release", None, ocarina_release)
|
|
|
|
|
|
env.Install("/usr/bin", "bin/ocarina")
|
|
env.Install("/usr/share", "share/ocarina/")
|
|
env.Install("/usr/share/applications", "share/applications/ocarina.desktop")
|
|
|
|
install = Alias("install", [ "/usr/bin", "/usr/share", "/usr/share/applications" ])
|
|
Depends(install, ocarina)
|
|
Clean(install, "/usr/share/ocarina")
|