2011-08-28 11:10:58 -04:00
|
|
|
MAJOR = 5
|
2011-10-28 14:08:44 -04:00
|
|
|
MINOR = 3
|
2011-08-28 11:10:58 -04:00
|
|
|
BUG = 0
|
2011-10-28 14:17:59 -04:00
|
|
|
EXTRA = ""
|
|
|
|
DEBUG = True
|
2011-08-28 11:10:58 -04:00
|
|
|
|
|
|
|
FLAGS = ["-O2"]
|
2011-10-28 14:17:59 -04:00
|
|
|
if DEBUG == True:
|
|
|
|
FLAGS = ["-Wall", "-Werror", "-g", "-DDEBUG"]
|
2011-08-28 11:10:58 -04:00
|
|
|
|
2011-10-28 14:17:59 -04:00
|
|
|
env = Environment(CCFLAGS = FLAGS)
|
2011-08-28 11:10:58 -04:00
|
|
|
if ARGUMENTS.get('VERBOSE') != "1":
|
|
|
|
env.Append(CXXCOMSTR = "CXX $TARGET")
|
|
|
|
env.Append(LINKCOMSTR = "Linking $TARGET")
|
|
|
|
env.Append(CPPPATH = "include")
|
2011-09-17 14:16:06 -04:00
|
|
|
|
2011-08-28 11:10:58 -04:00
|
|
|
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
|
|
|
|
env.ParseConfig('pkg-config --cflags --libs gstreamer-0.10')
|
2011-09-17 14:16:06 -04:00
|
|
|
env.ParseConfig('pkg-config --cflags --libs taglib')
|
2011-08-28 11:10:58 -04:00
|
|
|
|
|
|
|
def version_h():
|
|
|
|
f = open("include/version.h", "w")
|
|
|
|
for line in open("include/version.tmpl", "r"):
|
|
|
|
line = line.replace("__MAJOR__", str(MAJOR))
|
|
|
|
line = line.replace("__MINOR__", str(MINOR))
|
|
|
|
line = line.replace("__BUG__", str(BUG))
|
2011-10-28 14:17:59 -04:00
|
|
|
line = line.replace("__EXTRA__", str(EXTRA))
|
2011-08-28 11:10:58 -04:00
|
|
|
f.write(line)
|
|
|
|
f.close()
|
|
|
|
version_h()
|
|
|
|
|
|
|
|
def list_dirs(directory):
|
|
|
|
import os
|
|
|
|
dirs = [x[0] for x in os.walk(directory)]
|
|
|
|
return [Glob(dir + "/*.cpp") for dir in dirs]
|
|
|
|
|
2011-09-07 08:12:02 -04:00
|
|
|
ocarina=env.Program('ocarina.bin', list_dirs('libsaria') + list_dirs('ocarina'))
|
2011-08-28 11:10:58 -04:00
|
|
|
Clean(ocarina, "include/version.h")
|