2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-29 21:41:44 +01:00
waf/playground/nasm/wscript
Thomas Nagy 2d4f81b071 docs
2012-07-28 10:50:13 +02:00

34 lines
695 B
Python

#! /usr/bin/env python
# encoding: utf-8
import sys
def configure(conf):
conf.load('nasm')
try:
size = sys.maxint
except AttributeError:
size = sys.maxsize # python 3.2
if size < 4**21:
conf.fatal('this example is for 64-bit systems only')
conf.find_program('ld', var='ASLINK')
conf.env.ASLINKFLAGS = ['-s']
conf.env.CPPPATH_ST = '-I%s'
conf.env.ASFLAGS = ['-f', 'elf64']
def build(bld):
bld(
features = 'asm asmprogram',
source = 'test.s',
target = 'asmtest',
asflags = ['-f', 'elf64'],
includes = '.')
def disp(ctx):
node = ctx.bldnode.ant_glob('asmtest*', remove=False)[0]
ctx.exec_command('%s' % node.abspath(), shell=False)
bld.add_post_fun(disp)