summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-04-18 21:40:15 +0100
committerCarl Hetherington <cth@carlh.net>2013-04-18 21:40:15 +0100
commit160d55ae1f3fe8d84ade777154c673d350e3c02c (patch)
treee49fbbd36df6330e68216f0c1248f244cd2be1a8
parent178fadde4c7b4c0816f06ead30030fa29e7d13c7 (diff)
cdist bits.
-rwxr-xr-xcbuild7
-rw-r--r--cscript21
2 files changed, 14 insertions, 14 deletions
diff --git a/cbuild b/cbuild
index 59beeb13..836dabaa 100755
--- a/cbuild
+++ b/cbuild
@@ -6,6 +6,7 @@ import os
parser = argparse.ArgumentParser()
parser.add_argument('command')
parser.add_argument('-p', '--prefix', help='prefix', required=True)
+parser.add_argument('-s', '--static', help='build statically', action='store_true')
args = parser.parse_args()
def command(c):
@@ -13,4 +14,8 @@ def command(c):
os.system(c)
if args.command == 'build':
- command('./waf configure --prefix=%s build install' % args.prefix)
+ cmd = './waf configure --prefix=%s' % args.prefix
+ if args.static:
+ cmd += ' --static-libdcp --static-openjpeg'
+ cmd += ' build install'
+ command(cmd)
diff --git a/cscript b/cscript
index 9e0eaaac..09bd76bb 100644
--- a/cscript
+++ b/cscript
@@ -1,14 +1,9 @@
-release_targets = ['source']
-
-def build(dep_prefix, install_prefix, target, static, parallel):
- configure = './waf configure --prefix=%s' % install_prefix
- if static:
- configure += ' --static-openjpeg --static-libdcp'
-
- var = "CXXFLAGS=-I%s/include LINKFLAGS=-L%s/lib PKG_CONFIG_PATH=%s/lib/pkgconfig" % (dep_prefix, dep_prefix, dep_prefix)
-
- command('%s %s' % (var, configure))
- command('./waf build install')
-
-
+def build(env, target):
+ cmd = './waf configure --prefix=%s' % env.work_dir(True)
+ if target.platform == 'linux':
+ cmd += ' --static-libdcp --static-openjpeg'
+ elif target.platform == 'windows':
+ cmd += ' --target-windows'
+ env.command(cmd)
+ env.command('./waf build install')