2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00
waf/demos/asm/wscript

28 lines
601 B
Plaintext
Raw Normal View History

2011-09-10 11:13:51 +02:00
#! /usr/bin/env python
# encoding: utf-8
2012-05-06 00:08:50 +02:00
import sys
2011-09-10 11:13:51 +02:00
def configure(conf):
conf.load('gcc gas')
2012-05-13 16:13:44 +02:00
try:
size = sys.maxint
except AttributeError:
size = sys.maxsize # python 3.2
if size < 4**21:
2012-05-06 00:08:50 +02:00
conf.fatal('this example is for 64-bit systems only')
2011-09-10 11:13:51 +02:00
def build(bld):
# http://docs.waf.googlecode.com/git/apidocs_16/tools/asm.html
2011-09-10 11:13:51 +02:00
bld.program(
2012-05-02 09:23:58 +02:00
source = 'main.c test.S',
target = 'asmtest',
2014-04-30 22:37:36 +02:00
defines = 'foo=12',
2012-05-02 09:23:58 +02:00
includes = '.')
2011-09-10 11:13:51 +02:00
2012-05-06 00:08:50 +02:00
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)