# -*-python-*-

name = 'flower'
outdir = Dir ('.').path

Import ('env', 'src_glob')
sources = src_glob ('*.cc')

e = env.Copy ()
e.Append (CPPPATH = ['#/flower/include', outdir,])
includes = src_glob ('include/*.hh')

if 1: # ut
	def test_source (x):
		x.startswith ('test')
	test_sources = filter (lambda x: x.startswith ('test'), sources)
	sources = filter (lambda x: not x.startswith ('test'), sources)
	ee = e.Copy ()
	ee.Append (LIBS = [name, 'boost_unit_test_framework'])
	test = ee.Program ('test' + name, test_sources)

if env['static']:
	e.Library (name, sources) 
if not env['static'] or env['shared']:
	e.SharedLibrary (name, sources)

po = env.Command ('lilypond.po', sources + includes, env['pocommand'])
env.Alias ('po-update', po)
