3 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
7 # Thomas Nagy, 2008-2016 (ita)
10 Assembly support, used by tools such as gas and nasm
12 To declare targets using assembly::
19 features='c cstlib asm',
24 features='asm asmprogram',
28 Support for pure asm programs and libraries should also work::
32 conf.find_program('ld', 'ASLINK')
36 features='asm asmprogram',
41 from waflib
import Task
42 from waflib
.Tools
.ccroot
import link_task
, stlink_task
43 from waflib
.TaskGen
import extension
47 Compiles asm files by gas/nasm/yasm/...
50 run_str
= '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}'
52 @extension('.s', '.S', '.asm', '.ASM', '.spp', '.SPP')
53 def asm_hook(self
, node
):
55 Binds the asm extension to the asm task
57 :param node: input file
58 :type node: :py:class:`waflib.Node.Node`
60 return self
.create_compiled_task('asm', node
)
62 class asmprogram(link_task
):
63 "Links object files into a c program"
64 run_str
= '${ASLINK} ${ASLINKFLAGS} ${ASLNK_TGT_F}${TGT} ${ASLNK_SRC_F}${SRC}'
68 class asmshlib(asmprogram
):
69 "Links object files into a c shared library"
72 class asmstlib(stlink_task
):
73 "Links object files into a c static library"
77 conf
.env
.ASMPATH_ST
= '-I%s'