Source

cexp / cexp / ext / wscript

Full commit
# -*- python -*-

# the following two variables are used by the target "waf dist"
VERSION='0.0.1'
APPNAME='cexp'

# these variables are mandatory ('/' are converted automatically)
top = '.'
out = 'build'


def options(opt):
    opt.load('compiler_cc')


def configure(conf):
    conf.load('compiler_cc')


def build(bld):

    def gene_bld(source, target, cflags):
        return bld.shlib(
            source = bld.path.ant_glob('src/%s.c' % source),
            includes = ["include"],
            target = target,
            cflags = cflags,
            )

    cflags = ['-Wall', '-std=c99']
    for trg in ['constinloop', 'userestrict']:
        gene_bld(trg, trg, cflags + ['-O3'])
        ## for optz in ['1', '2', '3']:
        ##     gene_bld(trg, '%s-O%s' % (trg, optz), cflags + ['-O%s' % optz])