aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-04 19:38:14 +0000
committerDavid Robillard <d@drobilla.net>2012-08-04 19:38:14 +0000
commit7f1d0be3b6467a238d728732c7277b13d7ba4271 (patch)
tree646e903eb1f8e7e6e73b5978c16a5f6e7a35c4fe /wscript
parent87dcd1b0356dec505eacdb27a9589eeb5aa42670 (diff)
downloadserd-7f1d0be3b6467a238d728732c7277b13d7ba4271.tar.gz
serd-7f1d0be3b6467a238d728732c7277b13d7ba4271.tar.bz2
serd-7f1d0be3b6467a238d728732c7277b13d7ba4271.zip
Use more portable defines instead of -D in CFLAGS.
git-svn-id: http://svn.drobilla.net/serd/trunk@362 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'wscript')
-rw-r--r--wscript20
1 files changed, 9 insertions, 11 deletions
diff --git a/wscript b/wscript
index 58002fff..f10eebaa 100644
--- a/wscript
+++ b/wscript
@@ -58,7 +58,7 @@ def configure(conf):
autowaf.define(conf, 'SERD_STACK_CHECK', SERD_VERSION)
if Options.options.largefile:
- conf.env.append_unique('CFLAGS', '-D_FILE_OFFSET_BITS=64')
+ conf.env.append_unique('DEFINES', ['_FILE_OFFSET_BITS=64'])
# Check for gcov library (for test coverage)
if conf.env['BUILD_TESTS']:
@@ -77,21 +77,21 @@ def configure(conf):
conf.check(function_name='posix_memalign',
header_name='stdlib.h',
define_name='HAVE_POSIX_MEMALIGN',
- cflags='-D_POSIX_C_SOURCE=201112L',
+ defines=['_POSIX_C_SOURCE=201112L'],
mandatory=False)
# Check for posix_fadvise
conf.check(function_name='posix_fadvise',
header_name='fcntl.h',
define_name='HAVE_POSIX_FADVISE',
- cflags='-D_POSIX_C_SOURCE=201112L',
+ defines=['_POSIX_C_SOURCE=201112L'],
mandatory=False)
# Check for fileno
conf.check(function_name='fileno',
header_name='stdio.h',
define_name='HAVE_FILENO',
- cflags='-D_POSIX_C_SOURCE=201112L',
+ defines=['_POSIX_C_SOURCE=201112L'],
mandatory=False)
autowaf.define(conf, 'SERD_VERSION', SERD_VERSION)
@@ -142,9 +142,8 @@ def build(bld):
target = 'serd-%s' % SERD_MAJOR_VERSION,
vnum = SERD_LIB_VERSION,
install_path = '${LIBDIR}',
- defines = defines,
- cflags = libflags + [ '-DSERD_SHARED',
- '-DSERD_INTERNAL' ])
+ defines = defines + ['SERD_SHARED', 'SERD_INTERNAL'],
+ cflags = libflags)
# Static library
if bld.env['BUILD_STATIC']:
@@ -157,8 +156,7 @@ def build(bld):
target = 'serd-%s' % SERD_MAJOR_VERSION,
vnum = SERD_LIB_VERSION,
install_path = '${LIBDIR}',
- defines = defines,
- cflags = ['-DSERD_INTERNAL'])
+ defines = defines + ['SERD_INTERNAL'])
if bld.env['BUILD_TESTS']:
test_libs = libs
@@ -175,8 +173,8 @@ def build(bld):
name = 'libserd_profiled',
target = 'serd_profiled',
install_path = '',
- defines = defines,
- cflags = test_cflags + ['-DSERD_INTERNAL'])
+ defines = defines + ['SERD_INTERNAL'],
+ cflags = test_cflags)
# Unit test serdi
obj = bld(features = 'c cprogram',