summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-17 07:05:07 +0000
committerDavid Robillard <d@drobilla.net>2011-09-17 07:05:07 +0000
commit26ddb1d141c7b9067f8aa1a1db9a22dddd846da6 (patch)
tree5b9f0d52927993205bf3fc41f0ed4679dbf64395
parente925b68ca003e9370776b306b78b659153be57eb (diff)
downloadsord-26ddb1d141c7b9067f8aa1a1db9a22dddd846da6.tar.gz
sord-26ddb1d141c7b9067f8aa1a1db9a22dddd846da6.tar.bz2
sord-26ddb1d141c7b9067f8aa1a1db9a22dddd846da6.zip
Add ability to build static library.
git-svn-id: http://svn.drobilla.net/sord/trunk@160 3d64ff67-21c5-427c-a301-fe4f08042e5a
-rw-r--r--ChangeLog1
-rwxr-xr-xwafbin89303 -> 89530 bytes
-rw-r--r--wscript19
3 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a3272d..719aad5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ sord (UNRELEASED) unstable; urgency=low
* Add function sord_contains for checking for a triple pattern
* Fix Sord::Namespaces::qualify to no longer chop prefixes
+ * Add ability to build static library
-- David Robillard <d@drobilla.net> (UNRELEASED)
diff --git a/waf b/waf
index bea9f52..c97be3e 100755
--- a/waf
+++ b/waf
Binary files differ
diff --git a/wscript b/wscript
index d011452..ca5608b 100644
--- a/wscript
+++ b/wscript
@@ -32,6 +32,8 @@ def options(opt):
help="Build unit tests")
opt.add_option('--dump', type='string', default='', dest='dump',
help="Dump debugging output (iter, search, write, all)")
+ opt.add_option('--static', action='store_true', default=False, dest='static',
+ help="Build static library")
def configure(conf):
autowaf.configure(conf)
@@ -50,6 +52,7 @@ def configure(conf):
conf.env['BUILD_TESTS'] = Options.options.build_tests
conf.env['BUILD_UTILS'] = True
+ conf.env['BUILD_STATIC'] = Options.options.static
dump = Options.options.dump.split(',')
all = 'all' in dump
@@ -94,7 +97,7 @@ def build(bld):
autowaf.build_pc(bld, 'SORD', SORD_VERSION, SORD_MAJOR_VERSION, 'SERD',
{'SORD_MAJOR_VERSION' : SORD_MAJOR_VERSION})
- # Library
+ # Shared Library
obj = bld(features = 'c cshlib',
source = 'src/sord.c src/syntax.c',
includes = ['.', './src'],
@@ -109,6 +112,20 @@ def build(bld):
'-DSORD_INTERNAL' ])
autowaf.use_lib(bld, obj, 'GLIB SERD')
+ # Static Library
+ if bld.env['BUILD_STATIC']:
+ obj = bld(features = 'c cstlib',
+ source = 'src/sord.c src/syntax.c',
+ includes = ['.', './src'],
+ export_includes = ['.'],
+ name = 'libsord_static',
+ target = 'sord-%s' % SORD_MAJOR_VERSION,
+ vnum = SORD_LIB_VERSION,
+ install_path = '${LIBDIR}',
+ libs = [ 'm' ],
+ cflags = [ '-DSORD_INTERNAL' ])
+ autowaf.use_lib(bld, obj, 'GLIB SERD')
+
if bld.env['BUILD_TESTS']:
test_cflags = [ '-fprofile-arcs', '-ftest-coverage' ]