7712c3aad6037b3718a99fbcda20bb200fccdbe0
[aubio.git] / tests / wscript_build
1 # vim:set syntax=python:
2
3 import os.path
4
5 uselib = ['aubio']
6
7 includes = ['../src', '.']
8 programs_sources = ctx.path.ant_glob('src/**/*.c')
9
10 test_sound_target = '44100Hz_44100f_sine441_stereo.wav'
11 test_sound_abspath = bld.path.get_bld().make_node(test_sound_target)
12
13 bld(name='create_test_source',
14     rule='python ${SRC} ${TGT}',
15     source='create_test_source.py',
16     target=test_sound_target)
17
18 for source_file in programs_sources:
19     target = os.path.basename(os.path.splitext(str(source_file))[0])
20     bld(features = 'c cprogram test',
21             source = source_file,
22             target = target,
23             includes = includes,
24             use = uselib,
25             install_path = None,
26             defines = ['AUBIO_UNSTABLE_API=1',
27                         'AUBIO_TESTS_SOURCE=\"{}\"'.format(test_sound_abspath)]
28        )