Changeset 110ac90
- Timestamp:
- Jan 6, 2012, 11:59:03 PM (13 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- b517cb3
- Parents:
- a5bf9a5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/wscript_build
ra5bf9a5 r110ac90 1 # build examples 2 sndfileio = bld.new_task_gen(features = 'c', 3 includes = '../src', 4 source = ['sndfileio.c'], 5 target = 'sndfileio') 1 if bld.env['SNDFILE']: 2 # build examples 3 sndfileio = bld.new_task_gen(features = 'c', 4 includes = '../src', 5 source = ['sndfileio.c'], 6 target = 'sndfileio') 6 7 7 utilsio = bld.new_task_gen(features = 'c',8 includes = '../src',9 add_objects = 'sndfileio',10 source = ['utils.c', 'jackio.c'],11 uselib = ['LASH', 'JACK', 'SNDFILE'],12 target = 'utilsio')8 utilsio = bld.new_task_gen(features = 'c', 9 includes = '../src', 10 add_objects = 'sndfileio', 11 source = ['utils.c', 'jackio.c'], 12 uselib = ['LASH', 'JACK', 'SNDFILE'], 13 target = 'utilsio') 13 14 14 # loop over all *.c filenames in examples to build them all15 for target_name in bld.path.ant_glob('*.c', excl = ['utils.c', 'jackio.c', 'sndfileio.c']):16 bld.new_task_gen(features = 'c cprogram',17 add_objects = 'utilsio',18 includes = '../src',19 uselib = ['LASH', 'JACK', 'SNDFILE'],20 use = 'aubio',21 source = target_name,22 # program name is filename.c without the .c23 target = str(target_name).split('.')[0])15 # loop over all *.c filenames in examples to build them all 16 for target_name in bld.path.ant_glob('*.c', excl = ['utils.c', 'jackio.c', 'sndfileio.c']): 17 bld.new_task_gen(features = 'c cprogram', 18 add_objects = 'utilsio', 19 includes = '../src', 20 uselib = ['LASH', 'JACK', 'SNDFILE'], 21 use = 'aubio', 22 source = target_name, 23 # program name is filename.c without the .c 24 target = str(target_name).split('.')[0]) -
wscript
ra5bf9a5 r110ac90 1 1 #! /usr/bin/python 2 # 2 # 3 3 # waf build script, see http://code.google.com/p/waf/ 4 4 # usage: … … 10 10 # TODO 11 11 # - doc: add doxygen 12 # - tests: move to new unit test system 12 # - tests: move to new unit test system 13 13 14 14 APPNAME = 'aubio' … … 47 47 opt.add_option('--enable-lash', action='store_true', default=False, 48 48 help='compile with lash support') 49 opt.add_option('--enable-sndfile', action='store_true', default=False, 50 help='compile with libsndfile support') 49 51 opt.add_option('--enable-samplerate', action='store_true', default=False, 50 52 help='compile with libsamplerate support') … … 61 63 conf.check_tool('compiler_cxx') 62 64 conf.check_tool('gnu_dirs') # helpful for autotools transition and .pc generation 63 conf.check_tool('misc') # needed for subst65 #conf.check_tool('misc') # needed for subst 64 66 conf.load('waf_unit_test') 65 67 … … 82 84 83 85 # check dependencies 84 conf.check_cfg(package = 'sndfile', atleast_version = '1.0.4', 85 args = '--cflags --libs') 86 if (Options.options.enable_sndfile == True): 87 conf.check_cfg(package = 'sndfile', atleast_version = '1.0.4', 88 args = '--cflags --libs') 86 89 if (Options.options.enable_samplerate == True): 87 90 conf.check_cfg(package = 'samplerate', atleast_version = '0.0.15', … … 94 97 conf.define('HAVE_AUBIO_DOUBLE', 0) 95 98 96 if (Options.options.disable_fftw == False): 99 # check if pkg-config is installed, optional 100 try: 101 conf.find_program('pkg-config', var='PKGCONFIG') 102 except conf.errors.ConfigurationError: 103 conf.to_log('pkg-config was not found, not looking for (ignoring)') 104 105 print conf.env 106 print Options.options.directories 107 108 if (Options.options.disable_fftw == False) or not conf.env['PKGCONFIG']: 97 109 # one of fftwf or fftw3f 98 110 if (Options.options.disable_fftw3f == True): … … 121 133 122 134 # swig 123 if 0: #conf.find_program('swig', var='SWIG', mandatory = False): 135 try: 136 conf.find_program('swig', var='SWIG') 137 except conf.errors.ConfigurationError: 138 conf.to_log('swig was not found, not looking for (ignoring)') 139 if conf.env['SWIG']: 124 140 conf.check_tool('swig', tooldir='swig') 125 141 conf.check_swig_version('1.3.27') 126 142 127 143 # python 128 if conf.find_program('python' , mandatory = False):144 if conf.find_program('python'): 129 145 conf.check_tool('python') 130 146 conf.check_python_version((2,4,2)) … … 136 152 #define AUBIO_ERR(...) fprintf(stderr, __VA_ARGS__) 137 153 ''' 138 if conf.check_cc(fragment = check_c99_varargs, 154 if conf.check_cc(fragment = check_c99_varargs, 139 155 type='cstlib', 140 156 msg = 'Checking for C99 __VA_ARGS__ macro'): … … 144 160 conf.write_config_header('src/config.h') 145 161 146 # add some defines used in examples 162 # add some defines used in examples 147 163 conf.define('AUBIO_PREFIX', conf.env['PREFIX']) 148 164 conf.define('PACKAGE', APPNAME) 149 165 150 166 # check if docbook-to-man is installed, optional 151 conf.find_program('docbook-to-man', var='DOCBOOKTOMAN', mandatory=False) 167 try: 168 conf.find_program('docbook-to-man', var='DOCBOOKTOMAN') 169 except conf.errors.ConfigurationError: 170 conf.to_log('docbook-to-man was not found (ignoring)') 152 171 153 172 def build(bld): 154 bld.env['VERSION'] = VERSION 155 bld.env['LIB_VERSION'] = LIB_VERSION 173 bld.env['VERSION'] = VERSION 174 bld.env['LIB_VERSION'] = LIB_VERSION 156 175 157 176 # add sub directories … … 162 181 163 182 # create the aubio.pc file for pkg-config 164 aubiopc = bld.new_task_gen('subst') 165 aubiopc.source = 'aubio.pc.in' 166 aubiopc.target = 'aubio.pc' 167 aubiopc.install_path = '${PREFIX}/lib/pkgconfig' 183 if bld.env['TARGET_PLATFORM'] == 'linux': 184 aubiopc = bld.new_task_gen('subst') 185 aubiopc.source = 'aubio.pc.in' 186 aubiopc.target = 'aubio.pc' 187 aubiopc.install_path = '${PREFIX}/lib/pkgconfig' 168 188 169 189 # build manpages from sgml files … … 177 197 reentrant = 0, 178 198 ) 179 manpages = bld.new_task_gen(name = 'docbooktoman', 199 manpages = bld.new_task_gen(name = 'docbooktoman', 180 200 source=bld.path.ant_glob('doc/*.sgml')) 181 201 bld.install_files('${MANDIR}/man1', bld.path.ant_glob('doc/*.1')) 182 202 183 203 # install woodblock sound 184 bld.install_files('${PREFIX}/share/sounds/aubio/', 204 bld.install_files('${PREFIX}/share/sounds/aubio/', 185 205 'sounds/woodblock.aiff') 186 206 … … 195 215 def build_tests(bld): 196 216 for target_name in bld.path.ant_glob('tests/src/**/*.c'): 217 includes = ['src'] 218 uselib = [] 219 if not str(target_name).endswith('-jack.c'): 220 includes = [] 221 uselib = [] 222 extra_source = [] 223 else: 224 # phasevoc-jack needs jack 225 if bld.env['JACK']: 226 includes = ['examples'] 227 uselib = ['JACK'] 228 extra_source = ['examples/jackio.c'] 229 else: 230 continue 231 197 232 this_target = bld.new_task_gen( 198 233 features = 'c cprogram test', 199 source = target_name, 234 uselib = uselib, 235 source = [target_name] + extra_source, 200 236 target = str(target_name).split('.')[0], 201 includes = 'src',237 includes = ['src'] + includes, 202 238 defines = 'AUBIO_UNSTABLE_API=1', 203 239 use = 'aubio') 204 # phasevoc-jack also needs jack205 if str(target_name).endswith('test-phasevoc-jack.c'):206 this_target.includes = ['src', 'examples']207 this_target.uselib = ['JACK']208 this_target.target += ' examples/jackio.c'
Note: See TracChangeset
for help on using the changeset viewer.