waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

wscript (695B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 
      4 import sys
      5 
      6 def configure(conf):
      7 	conf.load('nasm')
      8 	try:
      9 		size = sys.maxint
     10 	except AttributeError:
     11 		size = sys.maxsize # python 3.2
     12 	if size < 4**21:
     13 		conf.fatal('this example is for 64-bit systems only')
     14 
     15 	conf.find_program('ld', var='ASLINK')
     16 	conf.env.ASLINKFLAGS = ['-s']
     17 	conf.env.CPPPATH_ST = '-I%s'
     18 	conf.env.ASFLAGS = ['-f', 'elf64']
     19 
     20 def build(bld):
     21 
     22 	bld(
     23 		features = 'asm asmprogram',
     24 		source   = 'test.s',
     25 		target   = 'asmtest',
     26 		asflags  = ['-f', 'elf64'],
     27 		includes = '.')
     28 
     29 	def disp(ctx):
     30 		node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
     31 		ctx.exec_command('%s' % node.abspath(), shell=False)
     32 	bld.add_post_fun(disp)
     33