nasm.py 588 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2008-2018 (ita)
  4. """
  5. Nasm tool (asm processing)
  6. """
  7. import os
  8. import waflib.Tools.asm # leave this
  9. from waflib.TaskGen import feature
  10. @feature('asm')
  11. def apply_nasm_vars(self):
  12. """provided for compatibility"""
  13. self.env.append_value('ASFLAGS', self.to_list(getattr(self, 'nasm_flags', [])))
  14. def configure(conf):
  15. """
  16. Detect nasm/yasm and set the variable *AS*
  17. """
  18. conf.find_program(['nasm', 'yasm'], var='AS')
  19. conf.env.AS_TGT_F = ['-o']
  20. conf.env.ASLNK_TGT_F = ['-o']
  21. conf.load('asm')
  22. conf.env.ASMPATH_ST = '-I%s' + os.sep