2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-24 18:59:39 +01:00
waf/demos/asm/wscript

29 lines
636 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):
2015-06-21 22:43:19 +02:00
# https://waf.io/apidocs/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',
asflags = '-Os',
includes = '.',
linkflags = '-no-pie')
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)