wscript 578 B

123456789101112131415161718192021222324252627
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. import sys
  4. def configure(conf):
  5. conf.load('gcc gas')
  6. try:
  7. size = sys.maxint
  8. except AttributeError:
  9. size = sys.maxsize # python 3.2
  10. if size < 4**21:
  11. conf.fatal('this example is for 64-bit systems only')
  12. def build(bld):
  13. # https://waf.io/apidocs/tools/asm.html
  14. bld.program(
  15. source = 'main.c test.S',
  16. target = 'asmtest',
  17. defines = 'foo=12',
  18. includes = '.')
  19. def disp(ctx):
  20. node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
  21. ctx.exec_command('%s' % node.abspath(), shell=False)
  22. bld.add_post_fun(disp)