build: Create a configuration script
Users set values here to be used by the build system. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
0dfb02c612
commit
fbcc660bd6
|
@ -1,6 +1,8 @@
|
|||
*.o
|
||||
*.swp
|
||||
*.pyc
|
||||
*.tar.gz
|
||||
ocarina.bin
|
||||
.sconsign.dblite
|
||||
bin/
|
||||
lib/
|
||||
|
|
11
Sconstruct
11
Sconstruct
|
@ -1,11 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
import os, sys
|
||||
|
||||
MAJOR = 5
|
||||
MINOR = 9
|
||||
BUG = 0
|
||||
EXTRA = ""
|
||||
DEBUG = True
|
||||
import config
|
||||
|
||||
PREFIX = "/usr"
|
||||
POSTFIX = ""
|
||||
|
@ -16,7 +11,7 @@ for argv in sys.argv:
|
|||
DESTDIR = split[1] + "/"
|
||||
|
||||
FLAGS = ["-O2"]
|
||||
if DEBUG == True:
|
||||
if config.DEBUG == True:
|
||||
FLAGS = ["-Wall", "-Werror", "-g", "-DDEBUG"]
|
||||
POSTFIX = "-debug"
|
||||
|
||||
|
@ -26,7 +21,7 @@ if ARGUMENTS.get('VERBOSE') != "1":
|
|||
env.Append(LINKCOMSTR = "Linking $TARGET")
|
||||
env.Append(CPPPATH = "include")
|
||||
|
||||
Export("env", "MAJOR", "MINOR", "BUG", "EXTRA", "DEBUG")
|
||||
config.env = env
|
||||
|
||||
def directory(dirs):
|
||||
objs = []
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
|
||||
MAJOR = 5
|
||||
MINOR = 9
|
||||
BUG = 0
|
||||
EXTRA = ""
|
||||
DEBUG = True
|
||||
|
||||
|
||||
env = None
|
||||
|
||||
def get_cpp_files():
|
||||
dirs = [x[0] for x in os.walk(".")]
|
||||
return [env.Glob(dir + "/*.cpp") for dir in dirs]
|
|
@ -1,6 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
Import("MAJOR", "MINOR", "BUG", "EXTRA")
|
||||
from config import *
|
||||
|
||||
f = open("version.h", "w")
|
||||
for line in open("version.tmpl", "r"):
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
Import('env')
|
||||
import config
|
||||
|
||||
env.ParseConfig('pkg-config --cflags --libs gstreamer-0.10')
|
||||
env.ParseConfig('pkg-config --cflags --libs gstreamer-interfaces-0.10')
|
||||
env.ParseConfig('pkg-config --cflags --libs taglib')
|
||||
|
||||
dirs = [x[0] for x in os.walk(".")]
|
||||
files = [Glob(dir + "/*.cpp") for dir in dirs]
|
||||
config.env.ParseConfig('pkg-config --cflags --libs gstreamer-0.10')
|
||||
config.env.ParseConfig('pkg-config --cflags --libs gstreamer-interfaces-0.10')
|
||||
config.env.ParseConfig('pkg-config --cflags --libs taglib')
|
||||
|
||||
files = config.get_cpp_files()
|
||||
Return('files')
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
Import('env')
|
||||
import config
|
||||
|
||||
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
|
||||
|
||||
dirs = [x[0] for x in os.walk(".")]
|
||||
files = [Glob(dir + "/*.cpp") for dir in dirs]
|
||||
config.env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
|
||||
|
||||
files = config.get_cpp_files()
|
||||
Return('files')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
import os, re
|
||||
from config import *
|
||||
|
||||
Import( "env", "DEBUG" )
|
||||
bin = "../bin/%s"
|
||||
lib = "../lib/ocarina/%s"
|
||||
|
||||
|
|
Loading…
Reference in New Issue