All pastes #2054924 Raw Edit

Unnamed

public text v1 · immutable
#2054924 ·published 2011-05-07 18:05 UTC
rendered paste body
extra_defines = []
c_flags = [ '-Wall', '-Werror', '-ansi', '-pedantic', '-std=c99' ]
ld_flags = []
selftesting = getattr(bld.env, 'selftesting', None)
if selftesting is not None and selftesting:
    extra_defines = [ 'SELFTESTS' ]
    c_flags.append('-ggdb')
    ld_flags.append('-Wl,--wrap=free')

src_path = bld.path.get_src()
bld_path = bld.path.get_bld()

includes = ' '.join([ src_path.abspath(),
        src_path.parent.find_node('include').abspath(),
        bld_path.abspath(), bld_path.parent.abspath() ])

print 'INCLUDES:', includes

bld.program(
    features = 'test includes',
    source = 'CuTest.c tests.c test_utils.c test_exec.c',
    target = 'dewitests',
    includes = includes,
    cflags = c_flags,
    defines = extra_defines,
    use = 'libdewi',
    linkflags = ld_flags,
    ut_cwd = bld.path.parent.find_node('testdata').abspath()
)

# vim:sts=4 sw=4 ts=4 si ci et syn=python fdm=marker ff=unix number