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

# advanced tests
# look in src/ for an example of a new compiler that creates cpp files

# 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):
	# the gcc module provides a --debug-level option
	#opt.tool_options('compiler_cc')
	pass

def configure(conf):
	#conf.check_tool('compiler_cc')
	conf.check_tool('gcc')
	#conf.check_tool('batched_cc') # <- faster compilations but a few constraints
	"""conf.check_tool('gcc', funs='''
find_gcc
find_cpp
find_ar
gcc_common_flags
gcc_modifier_win32
gcc_modifier_cygwin
gcc_modifier_darwin
gcc_modifier_aix5
gcc_add_flags
gcc_load_tools
''')"""

def build(bld):
	# process subfolders from here
	bld.add_subdirs('src')

	#bld.add_manual_dependency('src/main.c', 'some dependency string')

	# the following example shows how to add a dependency on the output of a function
	#def dep_func():
	#	import time
	#	return str(time.time())
	#bld.add_manual_dependency('src/main.c', dep_func)

