3 # build puredata external
10 ctx.load('compiler_c')
13 conf.load('compiler_c')
14 # required dependancies
15 conf.check_cfg(package = 'aubio', atleast_version = '0.4.0',
16 args = '--cflags --libs')
17 # check for puredata header
18 conf.check(header_name='m_pd.h')
21 aubio_pd = bld.new_task_gen(
22 features = 'cc cshlib',
24 defines = ['PD', 'PACKAGE_VERSION=\"'+repr(VERSION)+"\""],
25 install_path = '${PREFIX}/lib/pd/extra')
27 if bld.env['DEST_OS'] == 'win32':
28 aubio_pd.target = 'aubio.dll'
29 # do not use -fPIC -DPIC on windows
30 aubio_pd.env.shlib_CCFLAGS.remove('-fPIC')
31 aubio_pd.env.shlib_CCFLAGS.remove('-DPIC')
32 aubio_pd.env.append_unique('shlib_LINKFLAGS', ['-export_dynamic', '-lpd'])
33 elif bld.env['DEST_OS'] == 'darwin':
34 aubio_pd.target = 'aubio.pd_darwin'
35 aubio_pd.env.append_unique('shlib_LINKFLAGS',
36 ['-bundle', '-undefined suppres', '-flat_namespace'])
37 else: #if bld.env['DEST_OS'] == 'linux':
38 aubio_pd.target = 'aubio.pd_linux'
39 aubio_pd.env.append_unique('shlib_LINKFLAGS', ['--export_dynamic'])
41 # do not rename the shlib at all
42 aubio_pd.env.shlib_PATTERN = '%s'
43 # get the source files
44 aubio_pd.find_sources_in_dirs('.')
46 bld.install_files('${PREFIX}/lib/pd/doc/5.reference', 'help/*.pd')
48 bld.install_files('${PREFIX}/lib/pd/doc/aubio', 'examples/*.pd')