2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 01:46:15 +01:00
waf/demos/bisonflex/wscript

27 lines
583 B
Plaintext
Raw Permalink Normal View History

2011-09-10 11:13:51 +02:00
#!/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')