switch from bld.new_task_gen() to bld()

jackdbus needs explicit index because device reservation code
is shared with jackd and waf cannot autodetect this.
This commit is contained in:
Nedko Arnaudov 2012-02-15 21:30:08 +02:00
parent 7face7c29f
commit 971b1656d5
5 changed files with 16 additions and 30 deletions

View File

@ -15,8 +15,7 @@ def configure(conf):
conf.env['BUILD_ADAPTER'] = conf.is_defined('HAVE_SAMPLERATE')
def create_jack_process_obj(bld, target, sources, uselib = None):
process = bld.new_task_gen('cxx', 'shlib')
process.features += 'cxx'
process = bld(features = ['cxx', 'cxxshlib'])
process.env['shlib_PATTERN'] = '%s.so'
process.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
if bld.env['IS_MACOSX']:
@ -107,8 +106,7 @@ def build(bld):
]
includes = ['../macosx', '../macosx/RPC', '../posix'] + includes
serverlib = bld.new_task_gen('cxx', 'shlib')
serverlib.features.append('cc')
serverlib = bld(features = ['cxx', 'cxxshlib'])
serverlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
serverlib.includes = includes
serverlib.name = 'serverlib'
@ -190,8 +188,7 @@ def build(bld):
serverlib.env.append_value("LINKFLAGS", "-lnsl -lsocket")
if bld.env['BUILD_NETLIB'] == True:
netlib = bld.new_task_gen('cxx', 'shlib')
netlib.features.append('cc')
netlib = bld(features = ['cxx', 'cxxshlib'])
netlib.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
netlib.includes = includes
netlib.name = 'netlib'
@ -224,8 +221,7 @@ def build(bld):
netlib.vnum = bld.env['JACK_API_VERSION']
clientlib = bld.new_task_gen('cxx', 'shlib')
clientlib.features.append('cc')
clientlib = bld(features = ['cxx', 'cxxshlib'])
clientlib.defines = 'HAVE_CONFIG_H'
clientlib.uselib = uselib
clientlib.install_path = '${LIBDIR}'

View File

@ -40,8 +40,7 @@ def configure(conf):
conf.env['BUILD_JACKDBUS'] = True
def build(bld):
obj = bld.new_task_gen('cc', 'program')
obj.features += 'cc'
obj = bld(features = ['c', 'cprogram'], idx=17)
if bld.env['IS_LINUX']:
sysdeps_dbus_include = ['../linux', '../posix']
if bld.env['IS_MACOSX']:

View File

@ -77,8 +77,7 @@ def build(bld):
else:
uselib_local = 'clientlib'
prog = bld.new_task_gen('cxx', 'program')
prog.features.append('cc')
prog = bld(features='c cprogram')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = example_program_source
if bld.env['IS_MACOSX']:
@ -95,7 +94,7 @@ def build(bld):
prog.target = example_program
if bld.env['BUILD_EXAMPLE_CLIENT_TRANSPORT']:
prog = bld.new_task_gen('cc', 'program')
prog = bld(features = 'c cprogram')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = 'transport.c'
if bld.env['IS_MACOSX']:
@ -110,8 +109,7 @@ def build(bld):
prog.target = 'jack_transport'
if bld.env['BUILD_EXAMPLE_CLIENT_REC']:
prog = bld.new_task_gen('cc', 'program')
prog.features += 'cc'
prog = bld(features = 'c cprogram')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = 'capture_client.c'
if bld.env['IS_MACOSX']:
@ -127,8 +125,7 @@ def build(bld):
prog.target = 'jack_rec'
if bld.env['IS_LINUX'] or bld.env['IS_MACOSX']:
prog = bld.new_task_gen('cc', 'program')
prog.features += 'cc'
prog = bld(features = 'c cprogram')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = ['netsource.c', '../common/netjack_packet.c']
prog.env.append_value("CCFLAGS", "-DNO_JACK_ERROR")
@ -137,8 +134,7 @@ def build(bld):
prog.target = 'jack_netsource'
if bld.env['IS_LINUX'] and bld.env['BUILD_EXAMPLE_ALSA_IO']:
prog = bld.new_task_gen('cc', 'program')
prog.features += 'cc'
prog = bld(features = 'c cprogram')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = ['alsa_in.c', '../common/memops.c']
prog.env.append_value("CCFLAGS", "-DNO_JACK_ERROR")
@ -146,8 +142,7 @@ def build(bld):
prog.uselib_local = 'clientlib'
prog.target = 'alsa_in'
prog = bld.new_task_gen('cc', 'program')
prog.features += 'cc'
prog = bld(features = 'c cprogram')
prog.includes = os_incdir + ['../common/jack', '../common']
prog.source = ['alsa_out.c', '../common/memops.c']
prog.env.append_value("CCFLAGS", "-DNO_JACK_ERROR")
@ -156,8 +151,7 @@ def build(bld):
prog.target = 'alsa_out'
for example_lib, example_lib_source in list(example_libs.items()):
lib = bld.new_task_gen('cc', 'shlib')
lib.features += 'cc'
lib = bld(features = 'c cshlib')
lib.env['shlib_PATTERN'] = '%s.so'
lib.includes = os_incdir + ['../common/jack', '../common']
lib.target = example_lib

View File

@ -14,9 +14,8 @@ def configure(conf):
conf.define('HAVE_PPOLL', 1 )
def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld.new_task_gen('cxx', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver = bld(features = ['cxx', 'cxxshlib'])
driver.env['cxxshlib_PATTERN'] = 'jack_%s.so'
#driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE', 'HAVE_PPOLL']
driver.defines = ['HAVE_CONFIG_H','SERVER_SIDE', 'HAVE_PPOLL', 'HAVE_TIMERFD']
@ -32,8 +31,7 @@ def create_jack_driver_obj(bld, target, sources, uselib = None):
def build(bld):
if bld.env['BUILD_JACKD'] == True:
jackd = bld.new_task_gen('cxx', 'program')
jackd.features += 'cxx'
jackd = bld(features = ['cxx', 'cxxprogram'])
jackd.includes = ['../linux', '../posix', '../common/jack', '../common', '../dbus', '../']
jackd.defines = ['HAVE_CONFIG_H','SERVER_SIDE']
jackd.source = ['../common/Jackdmp.cpp']

View File

@ -15,8 +15,7 @@ test_programs = {
def build(bld):
for test_program, test_program_sources in list(test_programs.items()):
prog = bld.new_task_gen('cxx', 'program')
prog.features.append('cc')
prog = bld(features = 'cxx cxxprogram')
if bld.env['IS_MACOSX']:
prog.includes = ['..','../macosx', '../posix', '../common/jack', '../common']
if bld.env['IS_LINUX']: