Changeset 6b14351


Ignore:
Timestamp:
Dec 8, 2013, 4:58:42 AM (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:
a93dab3
Parents:
e9e2a87
Message:

wscript: wrap lines, remove old autotools check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    re9e2a87 r6b14351  
    1414APPNAME = 'aubio'
    1515
    16 # read from VERSION
     16# source VERSION
    1717for l in open('VERSION').readlines(): exec (l.strip())
    1818
    19 VERSION = '.'.join \
    20         ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
    21         + AUBIO_VERSION_STATUS
    22 LIB_VERSION = '.'.join \
    23         ([str(x) for x in [LIBAUBIO_LT_CUR, LIBAUBIO_LT_REV, LIBAUBIO_LT_AGE]])
    24 
    25 import os.path, sys
    26 if os.path.exists('src/config.h') or os.path.exists('Makefile'):
    27     print "Please run 'make distclean' to clean-up autotools files before using waf"
    28     sys.exit(1)
     19VERSION = '.'.join ([str(x) for x in [
     20    AUBIO_MAJOR_VERSION,
     21    AUBIO_MINOR_VERSION,
     22    AUBIO_PATCH_VERSION
     23    ]]) + AUBIO_VERSION_STATUS
     24
     25LIB_VERSION = '.'.join ([str(x) for x in [
     26    LIBAUBIO_LT_CUR,
     27    LIBAUBIO_LT_REV,
     28    LIBAUBIO_LT_AGE]])
    2929
    3030top = '.'
    3131out = 'build'
    3232
    33 def add_option_enable_disable(ctx, name, default = None, help_str = None, help_disable_str = None):
     33def add_option_enable_disable(ctx, name, default = None,
     34        help_str = None, help_disable_str = None):
    3435  if help_str == None:
    3536      help_str = 'enable ' + name + ' support'
    3637  if help_disable_str == None:
    3738      help_disable_str = 'do not ' + help_str
    38   ctx.add_option('--enable-' + name, action = 'store_true', default = default,
     39  ctx.add_option('--enable-' + name, action = 'store_true'
     40          default = default,
    3941          dest = 'enable_' + name.replace('-','_'),
    4042          help = help_str)
     
    4648def options(ctx):
    4749  add_option_enable_disable(ctx, 'fftw3f', default = False,
    48           help_str = 'compile with fftw3f instead of ooura (recommended)', help_disable_str = 'do not compile with fftw3f')
     50          help_str = 'compile with fftw3f instead of ooura (recommended)',
     51          help_disable_str = 'do not compile with fftw3f')
    4952  add_option_enable_disable(ctx, 'fftw3', default = False,
    50           help_str = 'compile with fftw3 instead of ooura', help_disable_str = 'do not compile with fftw3')
     53          help_str = 'compile with fftw3 instead of ooura',
     54          help_disable_str = 'do not compile with fftw3')
    5155  add_option_enable_disable(ctx, 'complex', default = False,
    52           help_str ='compile with C99 complex', help_disable_str = 'do not use C99 complex (default)' )
     56          help_str ='compile with C99 complex',
     57          help_disable_str = 'do not use C99 complex (default)' )
    5358  add_option_enable_disable(ctx, 'jack', default = None,
    54           help_str = 'compile with jack (auto)', help_disable_str = 'disable jack support')
     59          help_str = 'compile with jack (auto)',
     60          help_disable_str = 'disable jack support')
    5561  add_option_enable_disable(ctx, 'sndfile', default = None,
    56           help_str = 'compile with sndfile (auto)', help_disable_str = 'disable sndfile')
     62          help_str = 'compile with sndfile (auto)',
     63          help_disable_str = 'disable sndfile')
    5764  add_option_enable_disable(ctx, 'avcodec', default = None,
    58           help_str = 'compile with libavcodec (auto)', help_disable_str = 'disable libavcodec')
     65          help_str = 'compile with libavcodec (auto)',
     66          help_disable_str = 'disable libavcodec')
    5967  add_option_enable_disable(ctx, 'samplerate', default = None,
    60           help_str = 'compile with samplerate (auto)', help_disable_str = 'disable samplerate')
     68          help_str = 'compile with samplerate (auto)',
     69          help_disable_str = 'disable samplerate')
    6170  add_option_enable_disable(ctx, 'memcpy', default = True,
    6271          help_str = 'use memcpy hacks (default)',
     
    101110    ctx.env.CFLAGS += ['-std=c99']
    102111    if target_platform == 'ios':
    103         DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer"
    104         SDKROOT="%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
     112        DEVROOT = "/Applications/Xcode.app/Contents"
     113        DEVROOT += "/Developer/Platforms/iPhoneOS.platform/Developer"
     114        SDKROOT = "%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
    105115        ctx.env.CFLAGS += [ '-arch', 'arm64' ]
    106116        ctx.env.CFLAGS += [ '-arch', 'armv7' ]
     
    112122        ctx.env.LINKFLAGS += [ '-miphoneos-version-min=' + MINSDKVER ]
    113123    else:
    114         DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer"
    115         SDKROOT="%(DEVROOT)s/SDKs/iPhoneSimulator%(SDKVER)s.sdk" % locals()
     124        DEVROOT = "/Applications/Xcode.app/Contents"
     125        DEVROOT += "/Developer/Platforms/iPhoneSimulator.platform/Developer"
     126        SDKROOT = "%(DEVROOT)s/SDKs/iPhoneSimulator%(SDKVER)s.sdk" % locals()
    116127        ctx.env.CFLAGS += [ '-arch', 'i386' ]
    117128        ctx.env.CFLAGS += [ '-arch', 'x86_64' ]
     
    165176          args = '--cflags --libs', mandatory = False)
    166177      if (ctx.options.enable_double == True):
    167         ctx.msg('Warning', 'fftw3f enabled, but aubio compiled in double precision!')
     178        ctx.msg('Warning', 'fftw3f enabled, but compiling in double precision!')
    168179    else:
    169180      # fftw3f not enabled, take most sensible one according to enable_double
Note: See TracChangeset for help on using the changeset viewer.