summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct35
1 files changed, 35 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
new file mode 100644
index 0000000..5bafdd7
--- /dev/null
+++ b/SConstruct
@@ -0,0 +1,35 @@
+import os
+
+env = Environment(
+ ENV = os.environ,
+)
+
+env.Tool('qt4', toolpath = '.')
+
+AddOption('--release', action = 'store_true')
+AddOption('--profiling', action = 'store_true')
+
+if env['PLATFORM'] == 'darwin':
+ env.Append(CPPFLAGS = '-m32')
+ env.Append(LINKFLAGS = '-m32')
+ env.Append(FRAMEWORKS = ['phonon'])
+#else:
+ #env.Append(CPPPATH = [])
+ #env.Append(LIBS = [])
+
+if not GetOption('release'):
+ env.Append(CPPFLAGS = ['-Wall', '-g'])
+
+if GetOption('profiling'):
+ env.Append(CPPFLAGS = ['-pg'])
+ env.Append(LINKFLAGS = ['-pg'])
+
+Export('env')
+
+env.EnableQt4Modules(['QtCore', 'QtGui'], debug = False)
+
+env.Uic4(Glob('gui/*.ui'))
+
+env.Program('ongaku', Glob('*.cpp') + Glob('gui/*.cpp'))
+
+# vim: syn=python