Am 23.04.2013 13:38, schrieb Florian Paul Schmidt:

Hi, thanks for the info, but I would expect that there's a maybe more portable way, at least for the -fPIC option>

Flo

So you mean command-line options? Or do you look for some automatism?
However, here are command-line options implementations for this:

def options(opt):
    opt.load('compiler_c')
    autowaf.set_options(opt)
    comp = opt.add_option_group ('Set additional build flags', '')

    comp.add_option('--cflags',
                type='string',
                default='-Wall',
                dest='cflags',
                help='C base compiler flags [Default: %default]')

    comp.add_option('--linkflags',
                type='string',
                default='',
                dest='cshlibLINKFLAGS',
                help='C base link flags [Default: %default]')

def configure(conf):
    conf.load('compiler_c')
    autowaf.configure(conf)
    autowaf.display_header('Amp Configuration')

    opt = conf.options

    if opt.cflags:
        conf.env['CFLAGS'] += opt.cflags.split()
    if opt.cshlibLINKFLAGS:
        conf.env['LINKFLAGS_cshlib'] += opt.cshlibLINKFLAGS.split()

    [.....]

    autowaf.display_msg(conf, "LV2 bundle directory", conf.env['LV2DIR'])
    autowaf.display_msg(conf, "Cflags in use", conf.env['CFLAGS'])
autowaf.display_msg(conf, "Linkflags in use", conf.env['LINKFLAGS_cshlib'])


greets
hermann
_______________________________________________
Linux-audio-dev mailing list
[email protected]
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Reply via email to