1 # build puredata external
3 aubio_pd = bld.new_task_gen(
4 features = 'cc cshlib',
5 includes = '../../src',
6 uselib_local = ['aubio'],
8 install_path = '${PREFIX}/lib/pd/extra')
10 # copy environment to tweak only pd stuff
11 aubio_pd.env = bld.env.copy()
14 if bld.env['DEST_OS'] == 'win32':
15 aubio_pd.target = 'aubio.dll'
16 # do not use -fPIC -DPIC on windows
17 aubio_pd.env.shlib_CCFLAGS.remove('-fPIC')
18 aubio_pd.env.shlib_CCFLAGS.remove('-DPIC')
19 aubio_pd.env.append_unique('shlib_LINKFLAGS', ['-export_dynamic', '-lpd'])
20 elif bld.env['DEST_OS'] == 'darwin':
21 aubio_pd.target = 'aubio.pd_darwin'
22 aubio_pd.env.append_unique('shlib_LINKFLAGS',
23 ['-bundle', '-undefined suppres', '-flat_namespace'])
24 else: #if bld.env['DEST_OS'] == 'linux':
25 aubio_pd.target = 'aubio.pd_linux'
26 aubio_pd.env.append_unique('shlib_LINKFLAGS', ['--export_dynamic'])
28 # do not rename the shlib at all
29 aubio_pd.env.shlib_PATTERN = '%s'
30 # get the source files
31 aubio_pd.find_sources_in_dirs('.')
33 bld.install_files('${PREFIX}/lib/pd/doc/5.reference', 'help/*.pd')
35 bld.install_files('${PREFIX}/lib/pd/doc/aubio', 'examples/*.pd')