2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-29 13:30:32 +01:00
waf/demos/bisonflex/wscript
2011-09-10 11:13:51 +02:00

27 lines
583 B
Python

#!/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')