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