6 # Version of this package (even if built as a child)
7 LV2EXT_VERSION
= datetime
.date
.isoformat(datetime
.datetime
.now()).replace('-', '.')
9 # Variables for 'waf dist'
10 APPNAME
= 'lv2plug.in'
11 VERSION
= LV2EXT_VERSION
18 autowaf
.set_options(opt
)
19 opt
.tool_options('compiler_cc')
20 opt
.tool_options('compiler_cxx')
23 autowaf
.configure(conf
)
24 conf
.check_tool('compiler_cc')
25 conf
.check_tool('compiler_cxx')
26 conf
.env
.append_value('CCFLAGS', '-std=c99')
27 pat
= conf
.env
['shlib_PATTERN']
28 ext
= pat
[pat
.rfind('.'):]
29 conf
.env
.append_value('shlib_EXTENSION', ext
)
31 def build_plugin(bld
, lang
, name
):
32 ext
= bld
.env
['shlib_EXTENSION'][0]
35 penv
['shlib_PATTERN'] = '%s' + ext
42 obj
= bld
.new_task_gen(lang
, 'shlib')
44 obj
.source
= [ 'plugins/%s.lv2/%s.%s' % (name
, name
, ext
) ]
45 obj
.includes
= ['.', './ext']
48 obj
.install_path
= '${LV2DIR}/' + name
+ '.lv2'
51 obj
.source
+= [ 'ext/lv2plugin.cpp' ]
54 data_file
= 'plugins/%s.lv2/%s.ttl' % (name
, name
)
55 manifest_file
= 'plugins/%s.lv2/manifest.ttl' % (name
)
56 bld
.install_files('${LV2DIR}/' + name
+ '.lv2', data_file
)
57 bld
.install_files('${LV2DIR}/' + name
+ '.lv2', manifest_file
)
59 def build_extension(bld
, name
, dir):
60 data_file
= '%s/%s.lv2/%s.ttl' % (dir, name
, name
)
61 manifest_file
= '%s/%s.lv2/manifest.ttl' % (dir, name
)
62 header_files
= '%s/%s.lv2/*.h' % (dir, name
)
63 bld
.install_files('${LV2DIR}/' + name
+ '.lv2', data_file
)
64 bld
.install_files('${LV2DIR}/' + name
+ '.lv2', manifest_file
)
65 bld
.install_files('${LV2DIR}/' + name
+ '.lv2', header_files
)
87 build_extension(bld
, e
, 'ext')
93 for e
in extensions
.split():
94 build_extension(bld
, e
, 'extensions')