Changeset dc467b5d for wscript


Ignore:
Timestamp:
Oct 27, 2013, 12:44:29 PM (10 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:
8247249
Parents:
dd15573 (diff), 7fc5ba2 (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 branch 'develop' of aubio.org:/git/aubio/aubio into wavetable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    rdd15573 rdc467b5d  
    3131out = 'build'
    3232
     33def add_option_enable_disable(ctx, name, default = None, help_str = None, help_disable_str = None):
     34  if help_str == None:
     35      help_str = 'enable ' + name + ' support'
     36  if help_disable_str == None:
     37      help_disable_str = 'do not ' + help_str
     38  ctx.add_option('--enable-' + name, action = 'store_true', default = default,
     39          dest = 'enable_' + name,
     40          help = help_str)
     41  ctx.add_option('--disable-' + name, action = 'store_false',
     42          #default = default,
     43          dest = 'enable_' + name,
     44          help = help_disable_str )
     45
    3346def options(ctx):
    34   ctx.add_option('--enable-double', action='store_true', default=False,
    35       help='compile aubio in double precision mode')
    36   ctx.add_option('--enable-fftw3f', action='store_true', default=False,
    37       help='compile with fftw3f instead of ooura (recommended)')
    38   ctx.add_option('--enable-fftw3', action='store_true', default=False,
    39       help='compile with fftw3 instead of ooura (recommended in double precision)')
    40   ctx.add_option('--enable-complex', action='store_true', default=False,
    41       help='compile with C99 complex')
    42   ctx.add_option('--enable-jack', action='store_true', default=None,
    43       help='compile with jack support')
    44   ctx.add_option('--enable-lash', action='store_true', default=None,
    45       help='compile with lash support')
    46   ctx.add_option('--enable-sndfile', action='store_true', default=None,
    47       help='compile with libsndfile support')
    48   ctx.add_option('--enable-samplerate', action='store_true', default=None,
    49       help='compile with libsamplerate support')
     47  add_option_enable_disable(ctx, 'double', default = False,
     48          help_str = 'compile aubio in double precision mode')
     49  add_option_enable_disable(ctx, 'fftw3f', default = False,
     50          help_str = 'compile with fftw3f instead of ooura (recommended)', help_disable_str = 'do not compile with fftw3f')
     51  add_option_enable_disable(ctx, 'fftw3', default = False,
     52          help_str = 'compile with fftw3 instead of ooura', help_disable_str = 'do not compile with fftw3')
     53  add_option_enable_disable(ctx, 'complex', default = False,
     54          help_str ='compile with C99 complex', help_disable_str = 'do not use C99 complex (default)' )
     55  add_option_enable_disable(ctx, 'jack', default = None,
     56          help_str = 'compile with jack (auto)', help_disable_str = 'disable jack support')
     57  add_option_enable_disable(ctx, 'lash', default = None,
     58          help_str = 'compile with LASH (auto)', help_disable_str = 'disable LASH' )
     59  add_option_enable_disable(ctx, 'sndfile', default = None,
     60          help_str = 'compile with sndfile (auto)', help_disable_str = 'disable sndfile')
     61  add_option_enable_disable(ctx, 'samplerate', default = None,
     62          help_str = 'compile with samplerate (auto)', help_disable_str = 'disable samplerate')
     63
    5064  ctx.add_option('--with-target-platform', type='string',
    5165      help='set target platform for cross-compilation', dest='target_platform')
    5266  ctx.load('compiler_c')
    5367  ctx.load('waf_unit_test')
     68  ctx.load('gnu_dirs')
    5469
    5570def configure(ctx):
     
    5772  ctx.load('compiler_c')
    5873  ctx.load('waf_unit_test')
     74  ctx.load('gnu_dirs')
    5975  ctx.env.CFLAGS += ['-g', '-Wall', '-Wextra']
    6076
     
    7389    ctx.define('HAVE_ACCELERATE', 1)
    7490
    75   if Options.platform == 'ios':
     91  if Options.platform in [ 'ios', 'iosimulator' ]:
    7692    ctx.env.CC = 'clang'
    7793    ctx.env.LD = 'clang'
    7894    ctx.env.LINK_CC = 'clang'
    79     SDKVER="6.1"
    80     DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
    81     SDKROOT="%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
     95    ctx.define('HAVE_ACCELERATE', 1)
     96    ctx.define('TARGET_OS_IPHONE', 1)
    8297    ctx.env.FRAMEWORK = ['CoreFoundation', 'AudioToolbox', 'Accelerate']
    83     ctx.define('HAVE_ACCELERATE', 1)
    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]
     98    SDKVER="7.0"
     99    MINSDKVER="6.1"
     100    if Options.platform == 'ios':
     101        DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
     102        SDKROOT="%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
     103        ctx.env.CFLAGS += [ '-arch', 'armv7' ]
     104        ctx.env.CFLAGS += [ '-arch', 'armv7s' ]
     105        ctx.env.LINKFLAGS += ['-arch', 'armv7']
     106        ctx.env.LINKFLAGS += ['-arch', 'armv7s']
     107    else:
     108        DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer"
     109        SDKROOT="%(DEVROOT)s/SDKs/iPhoneSimulator%(SDKVER)s.sdk" % locals()
     110        ctx.env.CFLAGS += [ '-arch', 'i386' ]
     111        ctx.env.LINKFLAGS += ['-arch', 'i386']
     112    ctx.env.CFLAGS += [ '-miphoneos-version-min=' + MINSDKVER ]
     113    ctx.env.CFLAGS += [ '--sysroot=%s' % SDKROOT]
     114    ctx.env.CFLAGS += ['-std=c99']
     115    ctx.env.LINKFLAGS += ['-std=c99']
     116    ctx.env.LINKFLAGS += ['--sysroot=%s' % SDKROOT]
    88117
    89118  # check for required headers
     
    139168            args = '--cflags --libs', mandatory = False)
    140169    ctx.define('HAVE_FFTW3', 1)
     170
     171  # fftw disabled, use ooura
     172  if 'HAVE_FFTW3F' in ctx.env.define_key:
     173    ctx.msg('Checking for FFT implementation', 'fftw3f')
     174  elif 'HAVE_FFTW3' in ctx.env.define_key:
     175    ctx.msg('Checking for FFT implementation', 'fftw3')
     176  elif 'HAVE_ACCELERATE' in ctx.env.define_key:
     177    ctx.msg('Checking for FFT implementation', 'vDSP')
    141178  else:
    142     # fftw disabled, use ooura
    143     if 'HAVE_ACCELERATE' in ctx.env.define_key:
    144         ctx.msg('Checking for FFT implementation', 'vDSP')
    145     else:
    146         ctx.msg('Checking for FFT implementation', 'ooura')
    147     pass
     179    ctx.msg('Checking for FFT implementation', 'ooura')
    148180
    149181  if (Options.options.enable_jack != False):
     
    175207  bld.recurse('src')
    176208  from waflib import Options
    177   if Options.platform != 'ios':
     209  if Options.platform not in ['ios', 'iosimulator']:
    178210      bld.recurse('examples')
    179211      bld.recurse('tests')
    180212
    181213  """
    182   # create the aubio.pc file for pkg-config
    183   if ctx.env['TARGET_PLATFORM'] == 'linux':
    184     aubiopc = ctx.new_task_gen('subst')
    185     aubiopc.source = 'aubio.pc.in'
    186     aubiopc.target = 'aubio.pc'
    187     aubiopc.install_path = '${PREFIX}/lib/pkgconfig'
    188 
    189   # build manpages from sgml files
    190   if ctx.env['DOCBOOKTOMAN']:
    191     import TaskGen
    192     TaskGen.declare_chain(
    193         name    = 'docbooktoman',
    194         rule    = '${DOCBOOKTOMAN} ${SRC} > ${TGT}',
    195         ext_in  = '.sgml',
    196         ext_out = '.1',
    197         reentrant = 0,
    198     )
    199     manpages = ctx.new_task_gen(name = 'docbooktoman',
    200         source=ctx.path.ant_glob('doc/*.sgml'))
    201     ctx.install_files('${MANDIR}/man1', ctx.path.ant_glob('doc/*.1'))
    202 
    203214  # install woodblock sound
    204215  bld.install_files('${PREFIX}/share/sounds/aubio/',
     
    206217  """
    207218
     219  bld( source = 'aubio.pc.in' )
     220
     221  # build manpages from sgml files
     222  if bld.env['DOCBOOKTOMAN']:
     223    from waflib import TaskGen
     224    if 'MANDIR' not in bld.env:
     225      bld.env['MANDIR'] = bld.env['PREFIX'] + '/share/man'
     226    TaskGen.declare_chain(
     227        name      = 'docbooktoman',
     228        rule      = '${DOCBOOKTOMAN} ${SRC} > ${TGT}',
     229        ext_in    = '.sgml',
     230        ext_out   = '.1',
     231        reentrant = False,
     232        install_path =  '${MANDIR}/man1',
     233    )
     234    bld( source = bld.path.ant_glob('doc/*.sgml') )
     235
     236  """
     237  bld(rule = 'doxygen ${SRC}', source = 'web.cfg') #, target = 'doc/web/index.html')
     238  """
     239
     240
    208241def shutdown(bld):
    209242    from waflib import Options, Logs
    210     if Options.platform == 'ios':
     243    if Options.platform in ['ios', 'iosimulator']:
    211244          msg ='aubio built for ios, contact the author for a commercial license'
    212245          Logs.pprint('RED', msg)
    213246          msg ='   Paul Brossier <piem@aubio.org>'
    214247          Logs.pprint('RED', msg)
     248
     249
     250def dist(ctx):
     251    ctx.excl  = ' **/.waf-1* **/*~ **/*.pyc **/*.swp **/.lock-w* **/.git*'
     252    ctx.excl += ' **/build/*'
     253    ctx.excl += ' **/python/gen **/python/build **/python/dist'
     254    ctx.excl += ' **/**.zip **/**.tar.bz2'
     255    ctx.excl += ' **/doc/full/*'
     256    ctx.excl += ' **/python/*.db'
     257    ctx.excl += ' **/python.old/*'
Note: See TracChangeset for help on using the changeset viewer.