diff options
author | David Robillard <d@drobilla.net> | 2012-08-07 18:20:32 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-07 18:20:32 +0000 |
commit | 09acd7ad1bee9a948c7219a9e56502f3e023c3ba (patch) | |
tree | 339dca43c9cda620d77e79d41079a378baa83f60 | |
parent | df5233986b6a4c13b777d9c2f89915c55f63c2ea (diff) | |
download | suil-09acd7ad1bee9a948c7219a9e56502f3e023c3ba.tar.gz suil-09acd7ad1bee9a948c7219a9e56502f3e023c3ba.tar.bz2 suil-09acd7ad1bee9a948c7219a9e56502f3e023c3ba.zip |
Support building Suil as a static library.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@4622 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | wscript | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -29,6 +29,8 @@ def options(opt): opt.load('compiler_c') opt.load('compiler_cxx') autowaf.set_options(opt) + opt.add_option('--static', action='store_true', default=False, dest='static', + help="Build static 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]") @@ -41,6 +43,8 @@ def configure(conf): autowaf.display_header('Suil Configuration') conf.env['NODELETE_FLAGS'] = [] + conf.env['BUILD_STATIC'] = Options.options.static + if conf.env['MSVC_COMPILER']: conf.env.append_unique('CFLAGS', ['-TP', '-MD']) else: @@ -110,7 +114,7 @@ def build(bld): module_dir = '${LIBDIR}/suil-' + SUIL_MAJOR_VERSION - # Library + # Shared Library obj = bld(features = 'c cshlib', export_includes = ['.'], source = 'src/host.c src/instance.c', @@ -124,6 +128,21 @@ def build(bld): lib = lib, uselib = 'LV2') + # Static library + if bld.env['BUILD_STATIC']: + obj = bld(features = 'c cstlib', + export_includes = ['.'], + source = 'src/host.c src/instance.c', + target = 'suil-%s' % SUIL_MAJOR_VERSION, + includes = ['.'], + defines = ['SUIL_INTERNAL'], + name = 'libsuil_static', + vnum = SUIL_LIB_VERSION, + install_path = '${LIBDIR}', + cflags = cflags, + lib = lib, + uselib = 'LV2') + if bld.is_defined('HAVE_GTK2') and bld.is_defined('HAVE_QT4'): obj = bld(features = 'cxx cxxshlib', source = 'src/gtk2_in_qt4.cpp', |