diff options
author | David Robillard <d@drobilla.net> | 2008-09-30 04:14:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-09-30 04:14:15 +0000 |
commit | 44c4d7202b4fd9e93385b4c0cf20739c99a39389 (patch) | |
tree | b6e07e217cfe417bea3174d53e9f48238057c3c4 | |
parent | 169f29c36847991537e9e7770c297956803c2f1c (diff) | |
download | lilv-44c4d7202b4fd9e93385b4c0cf20739c99a39389.tar.gz lilv-44c4d7202b4fd9e93385b4c0cf20739c99a39389.tar.bz2 lilv-44c4d7202b4fd9e93385b4c0cf20739c99a39389.zip |
Wafify SLV2.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1544 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | SConstruct | 74 | ||||
l--------- | waf | 1 | ||||
-rw-r--r-- | wscript | 86 |
3 files changed, 87 insertions, 74 deletions
diff --git a/SConstruct b/SConstruct deleted file mode 100644 index daaaaf1..0000000 --- a/SConstruct +++ /dev/null @@ -1,74 +0,0 @@ -#!python (This script must be run with scons) -# See INSTALL for build instructions, and COPYING for licensing information. - -import os - -print "WARNING: SCons building is experimental" -print "WARNING: This should NOT be used to build a system-installed SLV2" -print "WARNING: Use ./configure; make; make install" - -universal_cflags = '-std=c99 -I. -Wextra' -debug_cflags = '-O0 -g -DDEBUG' -opt_cflags = '-O2 -fomit-frame-pointer -DNDEBUG' -sys_cflags = os.environ['CFLAGS'] - -env = Environment(ENV = {'PATH' : os.environ['PATH'] }) -env.SConsignFile() - -opt = Options(['options.cache']) -opt.AddOptions( - BoolOption('JACK', 'Build JACK clients', True), - BoolOption('DEBUG', 'Debug build', False)) -opt.Update(env) -opt.Save('options.cache',env) -Help(opt.GenerateHelpText(env)) - -configure = env.Configure() - -env.ParseConfig('pkg-config --cflags --libs jack') -env.ParseConfig('redland-config --cflags --libs') - -env.Append(CCFLAGS = universal_cflags) -if env['DEBUG']: - print "Using debug CFLAGS:\t", debug_cflags - env.Append(CCFLAGS = debug_cflags) -elif sys_cflags: - print "Using system CFLAGS:\t", sys_cflags - env.Append(CCFLAGS = sys_cflags) -else: - print "Using default CFLAGS:\t", opt_cflags - env.Append(CCFLAGS = opt_cflags) - -env.Append(CCFLAGS = "-DCONFIG_H_PATH=\\\"" + os.path.abspath(".") + "/config/config.h\\\"") - -slv2_sources = Split(''' -src/plugin.c -src/pluginclass.c -src/pluginclasses.c -src/plugininstance.c -src/plugins.c -src/pluginui.c -src/pluginuis.c -src/pluginuiinstance.c -src/port.c -src/query.c -src/util.c -src/value.c -src/values.c -src/world.c -''') - - -env.SharedLibrary('slv2', slv2_sources) - -# Build against the local version we just built -env.Prepend(LIBS = 'slv2', LIBPATH = '.') - -env.Program('lv2_inspect', [ 'utils/lv2_inspect.c' ]) -env.Append(CCFLAGS = '-std=c99 -I.') -env.Program('lv2_list', [ 'utils/lv2_list.c' ]) -env.Program('ladspa2lv2', [ 'utils/ladspa2lv2.c' ]) - -if env['JACK']: - env.Program('lv2_simple_jack_host', [ 'hosts/lv2_simple_jack_host.c' ]) - env.Program('lv2_jack_host', [ 'hosts/lv2_jack_host.c' ]) @@ -0,0 +1 @@ +../waf
\ No newline at end of file @@ -0,0 +1,86 @@ +#!/usr/bin/env python +import Params + +# Variables for 'waf dist' +VERSION = '0.6.1' +APPNAME = 'slv2' + +# Mandatory variables +srcdir = '.' +blddir = 'build' + +def set_options(opt): + opt.tool_options('compiler_cc') + +def configure(conf): + if not conf.env['HAVE_LV2CORE']: + conf.check_pkg('lv2core', destvar='LV2CORE', vnum='1', mandatory=True) + if not conf.env['HAVE_REDLAND']: + conf.check_pkg('redland', destvar='REDLAND', vnum='1.0.8', mandatory=True) + if not conf.env['HAVE_JACK']: + conf.check_pkg('jack', destvar='JACK', vnum='0.107.0', mandatory=False) + if not conf.env['CC']: + conf.check_tool('compiler_cc') + conf.env.append_value('CCFLAGS', '-std=c99') + conf.define('PACKAGE_VERSION', VERSION) + conf.write_config_header('waf-config.h') + conf.env.append_value('CCFLAGS', '-DCONFIG_H_PATH=\\\"waf-config.h\\\"') + conf.env.append_value('CCFLAGS', '-DPACKAGE_VERSION=\\\"' + VERSION + '\\\"') + +def build(bld): + # Headers (slv2) + install_files('PREFIX', 'include/slv2', 'slv2/*.h') + + # Library (src) + obj = bld.create_obj('cc', 'shlib') + obj.source = ''' + src/plugin.c + src/pluginclass.c + src/pluginclasses.c + src/plugininstance.c + src/plugins.c + src/pluginui.c + src/pluginuiinstance.c + src/pluginuis.c + src/port.c + src/query.c + src/scalepoint.c + src/scalepoints.c + src/util.c + src/value.c + src/values.c + src/world.c + ''' + obj.includes = '..' + obj.name = 'libslv2' + obj.target = 'slv2' + obj.uselib = 'REDLAND' + obj.vnum = '1.0.0' + + # Utilities (util) + utils = ''' + utils/lv2_inspect + utils/lv2_list + ''' + for i in utils.split(): + obj = bld.create_obj('cc', 'program') + obj.source = i + '.c' + obj.includes = '.' + obj.uselib_local = 'libslv2' + obj.target = i + obj.inst_var = 0 + + # JACK Hosts (hosts) + hosts = ''' + hosts/lv2_jack_host + hosts/lv2_simple_jack_host + ''' + for i in hosts.split(): + obj = bld.create_obj('cc', 'program') + obj.source = i + '.c' + obj.includes = '.' + obj.uselib = 'JACK' + obj.uselib_local = 'libslv2' + obj.target = i + obj.inst_var = 0 + |