forked from mirror/waf
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
695 B
Python
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)
|
|
|