diff options
author | David Robillard <d@drobilla.net> | 2007-07-01 22:20:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-01 22:20:24 +0000 |
commit | daddc558d65b7725a6897c21dc6d1db547fc7dfe (patch) | |
tree | 2ad634b1b5ef6853c459997933aff1fe4a1c94d7 | |
parent | 87a7c71254f292939410b7fe376c80f4d8cd815e (diff) | |
download | lilv-daddc558d65b7725a6897c21dc6d1db547fc7dfe.tar.gz lilv-daddc558d65b7725a6897c21dc6d1db547fc7dfe.tar.bz2 lilv-daddc558d65b7725a6897c21dc6d1db547fc7dfe.zip |
Added preliminary/experimental scons file.
git-svn-id: http://svn.drobilla.net/lad/slv2@555 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | SConstruct | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct new file mode 100644 index 0000000..1f05e9c --- /dev/null +++ b/SConstruct @@ -0,0 +1,72 @@ +#!/bin/env python +# Run scons in this directory to build +# See INSTALL for build instructions, and COPYING for licensing information. + +import sys +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) + +slv2_sources = Split(''' +src/pluginclass.c +src/pluginclasses.c +src/query.c +src/plugininstance.c +src/value.c +src/port.c +src/util.c +src/pluginguiinstance.c +src/values.c +src/plugins.c +src/world.c +src/plugin.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' ]) |