wscript 583 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. def options(opt):
  4. opt.load('compiler_c')
  5. def configure(conf):
  6. conf.load('compiler_c flex bison')
  7. conf.env.LIB_CALC = ['fl']
  8. def build(bld):
  9. tg = bld(
  10. features = 'c cprogram',
  11. source = 'calc.l calc.y main.c',
  12. target = 'calc',
  13. use = 'CALC')
  14. # to compile in c++ mode change to:
  15. # features= 'cxx cxxprogram'
  16. # and add:
  17. # import waflib.Tools.cxx as cxx
  18. # tg.mappings['.c'] = cxx.cxx_hook
  19. # re-use the files for other targets:
  20. # bld(features='c cshlib', source='calc.tab.c calc.lex.c', use='CALC', target='hmm')