diff options
author | David Robillard <d@drobilla.net> | 2012-01-31 22:28:18 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-01-31 22:28:18 +0000 |
commit | fe3491419b084c2d41ad9f29274325e6c0043856 (patch) | |
tree | e50dcaea6879029f2a80f3b8884a36620ecea55d /wscript | |
parent | 86826ae6733119d462be9f3642161db895756643 (diff) | |
download | zix-fe3491419b084c2d41ad9f29274325e6c0043856.tar.gz zix-fe3491419b084c2d41ad9f29274325e6c0043856.tar.bz2 zix-fe3491419b084c2d41ad9f29274325e6c0043856.zip |
Windows/Visual C++ portability.
git-svn-id: http://svn.drobilla.net/zix/trunk@51 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -36,11 +36,14 @@ def options(opt): help="Build benchmarks") def configure(conf): + conf.load('compiler_c') autowaf.configure(conf) autowaf.display_header('Zix Configuration') - conf.load('compiler_c') - conf.env.append_value('CFLAGS', '-std=c99') + if conf.env['MSVC_COMPILER']: + conf.env.append_unique('CFLAGS', ['-TP', '-MD']) + else: + conf.env.append_unique('CFLAGS', '-std=c99') conf.env['BUILD_BENCH'] = Options.options.build_bench conf.env['BUILD_TESTS'] = Options.options.build_tests @@ -92,6 +95,10 @@ def build(bld): if Options.platform == 'darwin': framework = ['CoreServices'] + libflags = [ '-fvisibility=hidden' ] + if bld.env['MSVC_COMPILER']: + libflags = [] + lib_source = ''' src/fat_patree.c src/hash.c @@ -112,9 +119,8 @@ def build(bld): vnum = ZIX_LIB_VERSION, install_path = '${LIBDIR}', framework = framework, - cflags = ['-fvisibility=hidden', - '-DZIX_SHARED', - '-DZIX_INTERNAL' ]) + cflags = libflags + ['-DZIX_SHARED', + '-DZIX_INTERNAL']) if bld.env['BUILD_TESTS']: test_libs = ['pthread'] |