Changeset 985a5d1
- Timestamp:
- Nov 19, 2013, 11:46:35 PM (11 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:
- cdfc394
- Parents:
- d75c900
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/wscript_build
rd75c900 r985a5d1 9 9 uselib += ['LASH'] 10 10 11 ctx(features = 'c', 12 source = source, 13 includes = ['.'], 14 uselib = uselib, 15 lib = 'm', 16 target = 'lib_objects') 11 17 12 # build libaubio 18 # build libaubio.so (cshlib) and/or libaubio.a (cstlib) 13 19 if ctx.env['DEST_OS'] in ['ios', 'iosimulator']: 14 build_ lib_func = ctx.stlib15 else: 16 build_ lib_func = ctx.shlib20 build_features = ['cstlib'] 21 else: #linux, darwin, android, windows, ... 22 build_features = ['cshlib', 'cstlib'] 17 23 18 build_lib_func( 19 includes = ['.'], 20 source = source, 21 target = 'aubio', 22 lib = 'm', 23 uselib = uselib, 24 install_path = '${PREFIX}/lib', 25 vnum = ctx.env['LIB_VERSION']) 24 for feat in build_features: 25 ctx(features = 'c ' + feat, 26 use = ['lib_objects'], #source = source, 27 target = 'aubio', 28 install_path = '${PREFIX}/lib', 29 vnum = ctx.env['LIB_VERSION']) 26 30 27 31 # install headers, except _priv.h ones -
wscript
rd75c900 r985a5d1 75 75 ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra'] 76 76 77 if Options.options.target_platform: 78 Options.platform = Options.options.target_platform 79 ctx.env['DEST_OS'] = Options.platform 80 81 if Options.platform == 'win32': 77 target_platform = Options.platform 78 if ctx.options.target_platform: 79 target_platform = ctx.options.target_platform 80 ctx.env['DEST_OS'] = target_platform 81 82 if target_platform == 'win32': 82 83 ctx.env['shlib_PATTERN'] = 'lib%s.dll' 83 84 84 if Options.platform == 'darwin':85 if target_platform == 'darwin': 85 86 ctx.env.CFLAGS += ['-arch', 'i386', '-arch', 'x86_64'] 86 87 ctx.env.LINKFLAGS += ['-arch', 'i386', '-arch', 'x86_64'] … … 88 89 ctx.define('HAVE_ACCELERATE', 1) 89 90 90 if Options.platform in [ 'ios', 'iosimulator' ]:91 if target_platform in [ 'ios', 'iosimulator' ]: 91 92 ctx.define('HAVE_ACCELERATE', 1) 92 93 ctx.define('TARGET_OS_IPHONE', 1) … … 95 96 MINSDKVER="6.1" 96 97 ctx.env.CFLAGS += ['-std=c99'] 97 if Options.platform == 'ios':98 if target_platform == 'ios': 98 99 DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" 99 100 SDKROOT="%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals() … … 136 137 137 138 # optionally use complex.h 138 if ( Options.options.enable_complex == True):139 if (ctx.options.enable_complex == True): 139 140 ctx.check(header_name='complex.h') 140 141 141 142 # check dependencies 142 if ( Options.options.enable_sndfile != False):143 if (ctx.options.enable_sndfile != False): 143 144 ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4', 144 145 args = '--cflags --libs', mandatory = False) 145 if ( Options.options.enable_samplerate != False):146 if (ctx.options.enable_samplerate != False): 146 147 ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15', 147 148 args = '--cflags --libs', mandatory = False) 148 149 149 150 # double precision mode 150 if ( Options.options.enable_double == True):151 if (ctx.options.enable_double == True): 151 152 ctx.define('HAVE_AUBIO_DOUBLE', 1) 152 153 else: … … 154 155 155 156 # optional dependancies using pkg-config 156 if ( Options.options.enable_fftw3 != False or Options.options.enable_fftw3f != False):157 if (ctx.options.enable_fftw3 != False or ctx.options.enable_fftw3f != False): 157 158 # one of fftwf or fftw3f 158 if ( Options.options.enable_fftw3f != False):159 if (ctx.options.enable_fftw3f != False): 159 160 ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0', 160 161 args = '--cflags --libs', mandatory = False) 161 if ( Options.options.enable_double == True):162 if (ctx.options.enable_double == True): 162 163 ctx.msg('Warning', 'fftw3f enabled, but aubio compiled in double precision!') 163 164 else: 164 165 # fftw3f not enabled, take most sensible one according to enable_double 165 if ( Options.options.enable_double == True):166 if (ctx.options.enable_double == True): 166 167 ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0', 167 168 args = '--cflags --libs', mandatory = False) … … 181 182 ctx.msg('Checking for FFT implementation', 'ooura') 182 183 183 if ( Options.options.enable_jack != False):184 if (ctx.options.enable_jack != False): 184 185 ctx.check_cfg(package = 'jack', atleast_version = '0.15.0', 185 186 args = '--cflags --libs', mandatory = False) 186 187 187 if ( Options.options.enable_lash != False):188 if (ctx.options.enable_lash != False): 188 189 ctx.check_cfg(package = 'lash-1.0', atleast_version = '0.5.0', 189 190 args = '--cflags --libs', uselib_store = 'LASH', mandatory = False) … … 203 204 204 205 def build(bld): 205 bld.env['VERSION'] = VERSION 206 bld.env['LIB_VERSION'] = LIB_VERSION 207 208 # add sub directories 209 bld.recurse('src') 210 if bld.env['DEST_OS'] not in ['ios', 'iosimulator']: 211 bld.recurse('examples') 212 bld.recurse('tests') 213 214 bld( source = 'aubio.pc.in' ) 215 216 # build manpages from sgml files 217 if bld.env['DOCBOOKTOMAN']: 218 from waflib import TaskGen 219 if 'MANDIR' not in bld.env: 220 bld.env['MANDIR'] = bld.env['PREFIX'] + '/share/man' 221 TaskGen.declare_chain( 222 name = 'docbooktoman', 223 rule = '${DOCBOOKTOMAN} ${SRC} > ${TGT}', 224 ext_in = '.sgml', 225 ext_out = '.1', 226 reentrant = False, 227 install_path = '${MANDIR}/man1', 228 ) 229 bld( source = bld.path.ant_glob('doc/*.sgml') ) 230 231 """ 232 bld(rule = 'doxygen ${SRC}', source = 'web.cfg') #, target = 'doc/web/index.html') 233 """ 206 bld.env['VERSION'] = VERSION 207 bld.env['LIB_VERSION'] = LIB_VERSION 208 209 # add sub directories 210 bld.recurse('src') 211 if bld.env['DEST_OS'] not in ['ios', 'iosimulator']: 212 pass 213 if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']: 214 bld.recurse('examples') 215 bld.recurse('tests') 216 217 bld( source = 'aubio.pc.in' ) 218 219 # build manpages from sgml files 220 if bld.env['DOCBOOKTOMAN']: 221 from waflib import TaskGen 222 if 'MANDIR' not in bld.env: 223 bld.env['MANDIR'] = bld.env['PREFIX'] + '/share/man' 224 TaskGen.declare_chain( 225 name = 'docbooktoman', 226 rule = '${DOCBOOKTOMAN} ${SRC} > ${TGT}', 227 ext_in = '.sgml', 228 ext_out = '.1', 229 reentrant = False, 230 install_path = '${MANDIR}/man1', 231 ) 232 bld( source = bld.path.ant_glob('doc/*.sgml') ) 233 234 """ 235 bld(rule = 'doxygen ${SRC}', source = 'web.cfg') #, target = 'doc/web/index.html') 236 """ 234 237 235 238 236 239 def shutdown(bld): 237 from waflib import Options, Logs 238 if Options.platform in ['ios', 'iosimulator']: 239 msg ='aubio built for ios, contact the author for a commercial license' 240 Logs.pprint('RED', msg) 241 msg =' Paul Brossier <piem@aubio.org>' 242 Logs.pprint('RED', msg) 243 240 from waflib import Logs 241 if bld.options.target_platform in ['ios', 'iosimulator']: 242 msg ='building for %s, contact the author for a commercial license' % bld.options.target_platform 243 Logs.pprint('RED', msg) 244 msg =' Paul Brossier <piem@aubio.org>' 245 Logs.pprint('RED', msg) 244 246 245 247 def dist(ctx):
Note: See TracChangeset
for help on using the changeset viewer.