From 5d9ddb9f4e5468ff854522aa42f7a4296c555a74 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 29 Sep 2011 03:20:15 +0000 Subject: Load compiler_c first (fix --debug etc.). Windows fixes. git-svn-id: http://svn.drobilla.net/sord/trunk@168 3d64ff67-21c5-427c-a301-fe4f08042e5a --- wscript | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 2ccb072..35cf6ba 100644 --- a/wscript +++ b/wscript @@ -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 -- cgit v1.2.1