summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-08 21:48:56 +0000
committerDavid Robillard <d@drobilla.net>2012-08-08 21:48:56 +0000
commit27b26f08b3f0f3f9ac09e7d7b1fd8c41648b44bc (patch)
treebb3864b3fc5e0e249d9839c4b0ca1f9aedd6092e /wscript
parent89416fb9555141da41b1a45975b4eaf8b6f9189b (diff)
downloadsratom-27b26f08b3f0f3f9ac09e7d7b1fd8c41648b44bc.tar.gz
sratom-27b26f08b3f0f3f9ac09e7d7b1fd8c41648b44bc.tar.bz2
sratom-27b26f08b3f0f3f9ac09e7d7b1fd8c41648b44bc.zip
Add --no-shared option to avoid building shared libraries.
git-svn-id: http://svn.drobilla.net/lad/trunk/sratom@4626 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript31
1 files changed, 18 insertions, 13 deletions
diff --git a/wscript b/wscript
index 20d521a..aa467a7 100644
--- a/wscript
+++ b/wscript
@@ -31,6 +31,8 @@ def options(opt):
help="Build unit tests")
opt.add_option('--static', action='store_true', dest='static',
help="Build static library")
+ opt.add_option('--no-shared', action='store_true', dest='no_shared',
+ help='Do not build shared library')
def configure(conf):
conf.load('compiler_c')
@@ -39,7 +41,9 @@ def configure(conf):
autowaf.display_header('Sratom Configuration')
conf.env.BUILD_TESTS = Options.options.build_tests
- conf.env.BUILD_STATIC = Options.options.static
+ conf.env.BUILD_SHARED = not Options.options.no_shared
+ conf.env.BUILD_STATIC = (Options.options.static or
+ Options.options.static_progs)
# Check for gcov library (for test coverage)
if conf.env.BUILD_TESTS:
@@ -80,18 +84,19 @@ def build(bld):
defines = ['snprintf=_snprintf']
# Shared Library
- obj = bld(features = 'c cshlib',
- export_includes = ['.'],
- source = lib_source,
- includes = ['.', './src'],
- lib = libs,
- name = 'libsratom',
- target = 'sratom-%s' % SRATOM_MAJOR_VERSION,
- vnum = SRATOM_LIB_VERSION,
- install_path = '${LIBDIR}',
- defines = defines + ['SRATOM_SHARED', 'SRATOM_INTERNAL'],
- cflags = libflags)
- autowaf.use_lib(bld, obj, 'SERD SORD LV2')
+ if bld.env.BUILD_SHARED:
+ obj = bld(features = 'c cshlib',
+ export_includes = ['.'],
+ source = lib_source,
+ includes = ['.', './src'],
+ lib = libs,
+ name = 'libsratom',
+ target = 'sratom-%s' % SRATOM_MAJOR_VERSION,
+ vnum = SRATOM_LIB_VERSION,
+ install_path = '${LIBDIR}',
+ defines = defines + ['SRATOM_SHARED', 'SRATOM_INTERNAL'],
+ cflags = libflags)
+ autowaf.use_lib(bld, obj, 'SERD SORD LV2')
# Static library
if bld.env.BUILD_STATIC: