waf

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

wscript (598B)


      1 #! /usr/bin/env python
      2 # encoding: utf-8
      3 
      4 import sys
      5 
      6 def configure(conf):
      7 	conf.load('gcc gas')
      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 def build(bld):
     16 	# https://waf.io/apidocs/tools/asm.html
     17 	bld.program(
     18 		source   = 'main.c test.S',
     19 		target   = 'asmtest',
     20 		defines  = 'foo=12',
     21 		asflags  = '-Os',
     22 		includes = '.')
     23 
     24 	def disp(ctx):
     25 		node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
     26 		ctx.exec_command('%s' % node.abspath(), shell=False)
     27 	bld.add_post_fun(disp)
     28