You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
456 B
Python
29 lines
456 B
Python
#! /usr/bin/env python
|
|
|
|
"""
|
|
Compile some files with -O2 and others with -O3
|
|
"""
|
|
|
|
def options(opt):
|
|
opt.load('compiler_c')
|
|
|
|
def configure(conf):
|
|
conf.load('compiler_c')
|
|
|
|
def build(bld):
|
|
bld.objects(
|
|
source = 'test.c',
|
|
ccflags = '-O3',
|
|
target = 'my_objs')
|
|
|
|
bld.shlib(
|
|
source = 'a.c',
|
|
ccflags = '-O2',
|
|
target = 'lib1',
|
|
use = 'my_objs')
|
|
|
|
bld.program(
|
|
source = 'main.c',
|
|
target = 'test_c_program',
|
|
use = 'lib1')
|