mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-21 17:35:55 +01:00
27 lines
583 B
Python
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')
|
|
|