2 # build puredata external
8 opt.tool_options('compiler_cc')
11 conf.check_tool('compiler_cc')
12 # required dependancies
13 conf.check_cfg(package = 'aubio', atleast_version = '0.4.0',
14 args = '--cflags --libs')
17 aubio_pd = bld.new_task_gen(
18 features = 'cc cshlib',
21 install_path = '${PREFIX}/lib/pd/extra')
23 if bld.env['DEST_OS'] == 'win32':
24 aubio_pd.target = 'aubio.dll'
25 # do not use -fPIC -DPIC on windows
26 aubio_pd.env.shlib_CCFLAGS.remove('-fPIC')
27 aubio_pd.env.shlib_CCFLAGS.remove('-DPIC')
28 aubio_pd.env.append_unique('shlib_LINKFLAGS', ['-export_dynamic', '-lpd'])
29 elif bld.env['DEST_OS'] == 'darwin':
30 aubio_pd.target = 'aubio.pd_darwin'
31 aubio_pd.env.append_unique('shlib_LINKFLAGS',
32 ['-bundle', '-undefined suppres', '-flat_namespace'])
33 else: #if bld.env['DEST_OS'] == 'linux':
34 aubio_pd.target = 'aubio.pd_linux'
35 aubio_pd.env.append_unique('shlib_LINKFLAGS', ['--export_dynamic'])
37 # do not rename the shlib at all
38 aubio_pd.env.shlib_PATTERN = '%s'
39 # get the source files
40 aubio_pd.find_sources_in_dirs('.')
42 bld.install_files('${PREFIX}/lib/pd/doc/5.reference', 'help/*.pd')
44 bld.install_files('${PREFIX}/lib/pd/doc/aubio', 'examples/*.pd')