aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-29 03:20:32 +0000
committerDavid Robillard <d@drobilla.net>2011-09-29 03:20:32 +0000
commitd46544d355ee77fc49a2c3a2a5980dfab8b34bc2 (patch)
tree81c59f4b3799799a79080e1480b9e06e5f045045 /wscript
parentab0187d9658afa85a8364f556d3259e73f76307d (diff)
downloadserd-d46544d355ee77fc49a2c3a2a5980dfab8b34bc2.tar.gz
serd-d46544d355ee77fc49a2c3a2a5980dfab8b34bc2.tar.bz2
serd-d46544d355ee77fc49a2c3a2a5980dfab8b34bc2.zip
Load compiler_c first (fix --debug etc.).
Windows fixes. git-svn-id: http://svn.drobilla.net/serd/trunk@220 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'wscript')
-rw-r--r--wscript12
1 files changed, 8 insertions, 4 deletions
diff --git a/wscript b/wscript
index a1315753..5efedd6e 100644
--- a/wscript
+++ b/wscript
@@ -4,6 +4,7 @@ import glob
import os
import shutil
import subprocess
+import sys
from waflib.extras import autowaf as autowaf
import waflib.Logs as Logs, waflib.Options as Options
@@ -28,8 +29,8 @@ top = '.'
out = 'build'
def options(opt):
- autowaf.set_options(opt)
opt.load('compiler_c')
+ autowaf.set_options(opt)
opt.add_option('--no-utils', action='store_true', default=False, dest='no_utils',
help="Do not build command line utilities")
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
@@ -41,7 +42,6 @@ def options(opt):
def configure(conf):
conf.load('compiler_c')
-
autowaf.configure(conf)
autowaf.display_header('Serd Configuration')
@@ -84,6 +84,10 @@ def build(bld):
src/writer.c
'''
+ libflags = [ '-fvisibility=hidden' ]
+ if sys.platform == 'win32':
+ libflags = []
+
# Shared Library
obj = bld(features = 'c cshlib',
export_includes = ['.'],
@@ -93,8 +97,8 @@ def build(bld):
target = 'serd-%s' % SERD_MAJOR_VERSION,
vnum = SERD_LIB_VERSION,
install_path = '${LIBDIR}',
- cflags = [ '-fvisibility=hidden',
- '-DSERD_SHARED', '-DSERD_INTERNAL' ])
+ cflags = libflags + [ '-DSORD_SHARED',
+ '-DSORD_INTERNAL' ])
# Static library
if bld.env['BUILD_STATIC']: