wscript 695 B

123456789101112131415161718192021222324252627282930313233
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. import sys
  4. def configure(conf):
  5. conf.load('nasm')
  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. conf.find_program('ld', var='ASLINK')
  13. conf.env.ASLINKFLAGS = ['-s']
  14. conf.env.CPPPATH_ST = '-I%s'
  15. conf.env.ASFLAGS = ['-f', 'elf64']
  16. def build(bld):
  17. bld(
  18. features = 'asm asmprogram',
  19. source = 'test.s',
  20. target = 'asmtest',
  21. asflags = ['-f', 'elf64'],
  22. includes = '.')
  23. def disp(ctx):
  24. node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
  25. ctx.exec_command('%s' % node.abspath(), shell=False)
  26. bld.add_post_fun(disp)