diff options
author | David Robillard <d@drobilla.net> | 2012-08-11 23:42:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-11 23:42:14 +0000 |
commit | 83b5c7b86c23f1379d3a96ab4e70c41b032d8823 (patch) | |
tree | 05a7d1393d8f3500ece920b3377f3c8ba5e179d5 /wscript | |
parent | 91d638a34a872793f26892b627438ef7534e36e2 (diff) | |
download | lilv-83b5c7b86c23f1379d3a96ab4e70c41b032d8823.tar.gz lilv-83b5c7b86c23f1379d3a96ab4e70c41b032d8823.tar.bz2 lilv-83b5c7b86c23f1379d3a96ab4e70c41b032d8823.zip |
Add lv2bench utility.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4660 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 48 |
1 files changed, 33 insertions, 15 deletions
@@ -112,6 +112,14 @@ def configure(conf): define_name='HAVE_FILENO', mandatory=False) + conf.check_cc(function_name='clock_gettime', + header_name=['sys/time.h','time.h'], + defines=['_POSIX_C_SOURCE=199309L'], + define_name='HAVE_CLOCK_GETTIME', + uselib_store='CLOCK_GETTIME', + lib=['rt'], + mandatory=False) + autowaf.define(conf, 'LILV_VERSION', LILV_VERSION) if Options.options.dyn_manifest: autowaf.define(conf, 'LILV_DYN_MANIFEST', 1) @@ -165,6 +173,23 @@ def configure(conf): conf.undefine('LILV_DEFAULT_LV2_PATH') # Cmd line errors with VC++ print('') +def build_util(bld, name, defines): + obj = bld(features = 'c cprogram', + source = name + '.c', + includes = ['.', './src', './utils'], + use = 'liblilv', + target = name, + defines = defines, + install_path = '${BINDIR}') + if not bld.env.BUILD_SHARED or bld.env.STATIC_PROGS: + obj.use = 'liblilv_static' + if bld.env.STATIC_PROGS: + if not bld.env.MSVC_COMPILER: + obj.lib = ['m'] + obj.env.SHLIB_MARKER = obj.env.STLIB_MARKER + obj.linkflags = ['-static', '-Wl,--start-group'] + return obj + def build(bld): # C/C++ Headers includedir = '${INCLUDEDIR}/lilv-%s/lilv' % LILV_MAJOR_VERSION @@ -296,25 +321,18 @@ def build(bld): # Utilities if bld.env.BUILD_UTILS: utils = ''' + utils/lilv-bench utils/lv2info utils/lv2ls - utils/lilv-bench ''' for i in utils.split(): - obj = bld(features = 'c cprogram', - source = i + '.c', - includes = ['.', './src', './utils'], - use = 'liblilv', - target = i, - defines = defines, - install_path = '${BINDIR}') - if not bld.env.BUILD_SHARED or bld.env.STATIC_PROGS: - obj.use = 'liblilv_static' - if bld.env.STATIC_PROGS: - if not bld.env.MSVC_COMPILER: - obj.lib = ['m'] - obj.env.SHLIB_MARKER = obj.env.STLIB_MARKER - obj.linkflags = ['-static', '-Wl,--start-group'] + build_util(bld, i, defines) + + # lv2bench (less portable than other utilities) + if bld.is_defined('HAVE_CLOCK_GETTIME'): + obj = build_util(bld, 'utils/lv2bench', defines) + if not bld.env.MSVC_COMPILER: + obj.lib = ['rt'] # Documentation autowaf.build_dox(bld, 'LILV', LILV_VERSION, top, out) |