#!/usr/bin/env python
# encoding: utf-8

def options(opt):
	opt.load('compiler_c')

def configure(conf):
	conf.load('compiler_c flex bison')
	conf.env.LIB_CALC = ['fl']

def build(bld):
	tg = bld(
		features = 'c cprogram',
		source = 'calc.l calc.y main.c',
		target = 'calc',
		use    = 'CALC')

	# to compile in c++ mode change to:
	#    features= 'cxx cxxprogram'
	# and add:
	#    import waflib.Tools.cxx as cxx
	#    tg.mappings['.c'] = cxx.cxx_hook

	# re-use the files for other targets:
	# bld(features='c cshlib', source='calc.tab.c calc.lex.c', use='CALC', target='hmm')

