Changeset 2359cbd


Ignore:
Timestamp:
Nov 6, 2009, 12:08:21 AM (15 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:
7b485af
Parents:
3e17aed
Message:

wscript: factorise build of extra source files

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • examples/wscript_build

    r3e17aed r2359cbd  
    11# build examples
    2 
    3 defines = ['AUBIO_PREFIX="' + bld.env['AUBIO_PREFIX'] + '"']
    4 defines += ['PACKAGE="' + bld.env['PACKAGE'] + '"']
    5 
    6 extra_source = ['utils.c', 'sndfileio.c', 'jackio.c']
    7 
    8 bld.new_task_gen(features = 'cc',
    9     includes = '../src',
    10     source = extra_source,
    11     uselib = ['LASH'],
    12     defines = defines,
    13     target = 'utils_io')
    142
    153# loop over all *.c filenames in examples to build them all
    164for target_name in bld.path.ant_glob('*.c').split():
    175  # ignore utils.c
    18   if target_name in extra_source: continue
     6  if target_name in ['utils.c', 'jackio.c', 'sndfileio.c']: continue
    197  bld.new_task_gen(features = 'cc cprogram',
    20       add_objects = 'utils_io',
     8      add_objects = 'utilsio',
    219      includes = '../src',
    22       defines = defines,
    2310      uselib = ['LASH', 'JACK', 'SNDFILE'],
    2411      uselib_local = ['aubio'],
  • python/aubio/wscript_build

    r3e17aed r2359cbd  
    1 bld.new_task_gen(features = 'cc',
    2     includes = '../../examples ../../src',
    3     source = ['../../examples/sndfileio.c'],
    4     uselib = ['JACK'],
    5     target = 'sndfileio')
    6 
    71pyaubio = bld.new_task_gen(name = 'python-aubio',
    82  features = 'cc cshlib pyext',
  • wscript

    r3e17aed r2359cbd  
    126126  bld.env['LIB_VERSION'] = LIB_VERSION
    127127
     128  build_extras(bld)
     129
    128130  # add sub directories
    129131  bld.add_subdirs('src examples')
     
    181183      this_target.uselib = ['JACK']
    182184      this_target.source += ' examples/jackio.c'
     185
     186def build_extras(bld):
     187    # corner cases to build these ones only once
     188    sndfileio = bld.new_task_gen(features = 'cc',
     189        includes = 'examples src',
     190        source = ['examples/sndfileio.c'],
     191        target = 'sndfileio')
     192
     193    defines = ['AUBIO_PREFIX="' + bld.env['AUBIO_PREFIX'] + '"']
     194    defines += ['PACKAGE="' + bld.env['PACKAGE'] + '"']
     195
     196    utilsio = bld.new_task_gen(features = 'cc',
     197          includes = 'examples src',
     198          add_objects = 'sndfileio',
     199          source = ['examples/utils.c', 'examples/jackio.c'],
     200          defines = defines,
     201          target = 'utilsio')
Note: See TracChangeset for help on using the changeset viewer.