summaryrefslogtreecommitdiffstats
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
commit18c9076c989f9ed51601e250c0ad117c74bfafa7 (patch)
tree8d0825d7631f69569fd3ae44a0e79ec3bb8802ab
parent9c66569caea968cea4e0dfd5a0730cd34f6565a7 (diff)
downloadsuil-18c9076c989f9ed51601e250c0ad117c74bfafa7.tar.gz
suil-18c9076c989f9ed51601e250c0ad117c74bfafa7.tar.bz2
suil-18c9076c989f9ed51601e250c0ad117c74bfafa7.zip
Add --no-shared option to avoid building shared libraries.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4626 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--wscript33
1 files changed, 19 insertions, 14 deletions
diff --git a/wscript b/wscript
index bc4d863..6dc7ff0 100644
--- a/wscript
+++ b/wscript
@@ -31,6 +31,8 @@ def options(opt):
autowaf.set_options(opt)
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')
opt.add_option('--gtk2-lib-name', type='string', dest='gtk2_lib_name',
default="libgtk-x11-2.0.so",
help="Gtk2 library name [Default: libgtk-x11-2.0.so]")
@@ -43,9 +45,11 @@ def configure(conf):
autowaf.set_c99_mode(conf)
autowaf.display_header('Suil Configuration')
- conf.env.NODELETE_FLAGS = []
- 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)
+ conf.env.NODELETE_FLAGS = []
if (not conf.env.MSVC_COMPILER and
conf.check(linkflags = ['-Wl,-z,nodelete'],
msg = 'Checking for link flags -Wl,-z,-nodelete',
@@ -113,18 +117,19 @@ def build(bld):
module_dir = '${LIBDIR}/suil-' + SUIL_MAJOR_VERSION
# Shared Library
- obj = bld(features = 'c cshlib',
- export_includes = ['.'],
- source = 'src/host.c src/instance.c',
- target = 'suil-%s' % SUIL_MAJOR_VERSION,
- includes = ['.'],
- defines = ['SUIL_SHARED', 'SUIL_INTERNAL'],
- name = 'libsuil',
- vnum = SUIL_LIB_VERSION,
- install_path = '${LIBDIR}',
- cflags = cflags,
- lib = lib,
- uselib = 'LV2')
+ if bld.env.BUILD_SHARED:
+ obj = bld(features = 'c cshlib',
+ export_includes = ['.'],
+ source = 'src/host.c src/instance.c',
+ target = 'suil-%s' % SUIL_MAJOR_VERSION,
+ includes = ['.'],
+ defines = ['SUIL_SHARED', 'SUIL_INTERNAL'],
+ name = 'libsuil',
+ vnum = SUIL_LIB_VERSION,
+ install_path = '${LIBDIR}',
+ cflags = cflags,
+ lib = lib,
+ uselib = 'LV2')
# Static library
if bld.env.BUILD_STATIC: