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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
waf_old/docs/book/examples/cprog_objects/wscript

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')