Changeset fc117d0 for wscript


Ignore:
Timestamp:
Feb 11, 2013, 11:06:28 AM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
050a8f3
Parents:
5314432 (diff), 88fc249 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge from develop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r5314432 rfc117d0  
    5353      help='set target platform for cross-compilation', dest='target_platform')
    5454  ctx.load('compiler_c')
    55   ctx.load('gnu_dirs')
    5655  ctx.load('waf_unit_test')
    5756
    5857def configure(ctx):
    59   import Options
    60   ctx.check_tool('compiler_c')
    61   ctx.check_tool('gnu_dirs') # helpful for autotools transition and .pc generation
     58  from waflib import Options
     59  ctx.load('compiler_c')
    6260  ctx.load('waf_unit_test')
    63   ctx.env.CFLAGS = ['-g', '-Wall', '-Wextra']
     61  ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra']
    6462
    6563  if Options.options.target_platform:
     
    6967    ctx.env['shlib_PATTERN'] = 'lib%s.dll'
    7068
    71   if Options.platform == 'macfat':
     69  if Options.platform == 'darwin':
    7270    ctx.env.CFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
    7371    ctx.env.LINKFLAGS += ['-arch', 'i386', '-arch', 'x86_64']
     
    7573    ctx.env.LINK_CC = 'llvm-gcc-4.2'
    7674    ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox']
     75
     76  if Options.platform == 'ios':
     77    ctx.env.CC = 'clang'
     78    ctx.env.LD = 'clang'
     79    ctx.env.LINK_CC = 'clang'
     80    SDKVER="6.1"
     81    DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
     82    SDKROOT="%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
     83    ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox']
     84    ctx.env.CFLAGS += [ '-miphoneos-version-min=6.1', '-arch', 'armv7',
     85            '--sysroot=%s' % SDKROOT]
     86    ctx.env.LINKFLAGS += ['-std=c99', '-arch', 'armv7', '--sysroot=%s' %
     87            SDKROOT]
    7788
    7889  # check for required headers
     
    180191    ctx.to_log('docbook-to-man was not found (ignoring)')
    181192
    182 def build(ctx):
    183   ctx.env['VERSION'] = VERSION
    184   ctx.env['LIB_VERSION'] = LIB_VERSION
     193def build(bld):
     194  bld.env['VERSION'] = VERSION
     195  bld.env['LIB_VERSION'] = LIB_VERSION
    185196
    186197  # add sub directories
    187   ctx.add_subdirs(['src','examples'])
    188   if ctx.env['SWIG']:
    189     if ctx.env['PYTHON']:
    190       ctx.add_subdirs('python')
    191 
     198  bld.recurse('src examples')
     199  from waflib import Options
     200  if Options.platform != 'ios': bld.recurse('tests')
     201
     202  """
    192203  # create the aubio.pc file for pkg-config
    193204  if ctx.env['TARGET_PLATFORM'] == 'linux':
     
    212223
    213224  # install woodblock sound
    214   ctx.install_files('${PREFIX}/share/sounds/aubio/',
     225  bld.install_files('${PREFIX}/share/sounds/aubio/',
    215226      'sounds/woodblock.aiff')
    216 
    217   # build and run the unit tests
    218   build_tests(ctx)
    219 
    220 def shutdown(ctx):
    221   pass
    222 
    223 # loop over all *.c filenames in tests/src to build them all
    224 # target name is filename.c without the .c
    225 def build_tests(ctx):
    226   for target_name in ctx.path.ant_glob('tests/src/**/*.c'):
    227     uselib = []
    228     includes = ['src']
    229     extra_source = []
    230     if str(target_name).endswith('-jack.c') and ctx.env['JACK']:
    231       uselib += ['JACK']
    232       includes += ['examples']
    233       extra_source += ['examples/jackio.c']
    234 
    235     this_target = ctx.new_task_gen(
    236         features = 'c cprogram test',
    237         uselib = uselib,
    238         source = [target_name] + extra_source,
    239         target = str(target_name).split('.')[0],
    240         includes = includes,
    241         defines = 'AUBIO_UNSTABLE_API=1',
    242         cflags = ['-g'],
    243         use = 'aubio')
     227  """
Note: See TracChangeset for help on using the changeset viewer.