diff options
author | David Robillard <d@drobilla.net> | 2011-09-29 03:20:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-29 03:20:15 +0000 |
commit | 5d9ddb9f4e5468ff854522aa42f7a4296c555a74 (patch) | |
tree | 18b989d171cea5e4fba23a4e36403a3d33969f8e /wscript | |
parent | aa9c6a9a599c594f6a4d527e185ada44a4a68822 (diff) | |
download | sord-5d9ddb9f4e5468ff854522aa42f7a4296c555a74.tar.gz sord-5d9ddb9f4e5468ff854522aa42f7a4296c555a74.tar.bz2 sord-5d9ddb9f4e5468ff854522aa42f7a4296c555a74.zip |
Load compiler_c first (fix --debug etc.).
Windows fixes.
git-svn-id: http://svn.drobilla.net/sord/trunk@168 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -2,6 +2,7 @@ import glob import os import subprocess +import sys from waflib.extras import autowaf as autowaf import waflib.Logs as Logs, waflib.Options as Options @@ -26,9 +27,9 @@ top = '.' out = 'build' def options(opt): - autowaf.set_options(opt) opt.load('compiler_c') opt.load('compiler_cxx') + autowaf.set_options(opt) opt.add_option('--test', action='store_true', default=False, dest='build_tests', help="Build unit tests") opt.add_option('--dump', type='string', default='', dest='dump', @@ -37,13 +38,12 @@ def options(opt): help="Build static library") def configure(conf): + conf.load('compiler_c') + conf.load('compiler_cxx') autowaf.configure(conf) - conf.line_just = 32 autowaf.display_header('Sord configuration') - conf.load('compiler_c') - conf.load('compiler_cxx') - conf.env.append_value('CFLAGS', '-std=c99') + conf.env.append_unique('CFLAGS', '-std=c99') autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD', atleast_version='0.5.0', mandatory=True) @@ -95,9 +95,12 @@ def build(bld): autowaf.build_pc(bld, 'SORD', SORD_VERSION, SORD_MAJOR_VERSION, 'SERD', {'SORD_MAJOR_VERSION' : SORD_MAJOR_VERSION}) - source = 'src/sord.c src/syntax.c src/zix/hash.c src/zix/tree.c' + libflags = [ '-fvisibility=hidden' ] + if sys.platform == 'win32': + libflags = [] + # Shared Library obj = bld(features = 'c cshlib', source = source, @@ -108,9 +111,8 @@ def build(bld): vnum = SORD_LIB_VERSION, install_path = '${LIBDIR}', libs = [ 'm' ], - cflags = [ '-fvisibility=hidden', - '-DSORD_SHARED', - '-DSORD_INTERNAL' ]) + cflags = libflags + [ '-DSORD_SHARED', + '-DSORD_INTERNAL' ]) autowaf.use_lib(bld, obj, 'SERD') # Static Library |