Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-backports > by-pkgid > 5449138d6297d4beefc46ffe46a8c51a > files > 137

waf-1.5.11-1mdv2009.1.noarch.rpm

#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2010 (ita)

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

# these variables are mandatory ('/' are converted automatically)
srcdir = '.'
blddir = 'build'

def set_options(opt):
	opt.tool_options('compiler_cc')

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

def build(bld):

	# 1. A simple program
	bld(
		features = 'cc cprogram',
		source = bld.path.ant_glob('**/*.c'),
		target = 'test_c_app',
		uselib_local = 'my_static_lib',
		includes = '. /usr/include')

	# 2. A simple static library
	bld(
		features = 'cc cstaticlib',
		source = 'test_staticlib.c',
		target='my_static_lib')

	# note: the syntax bld(...) is equivalent to bld.new_task_gen(...)
	#       instantiates and object of the class task_gen (from the file TaskGen.py)

	# if we had a subfolder we would add the following:
	#bld.add_subdirs('src')