Please note:The SCons wiki is now restored from the attack in March 2013. All old passwords have been invalidated. Please reset your password if you have an account. If you note missing pages, please report them to webmaster@scons.org. Also, new account creation is currently disabled due to an ongoing spam flood (2013/08/27).

IMPORTANT NOTE: OUTDATED

Here is an example of a nasm files builder (nasm is the netwide assembler):

 nasm_builder = Builder(name='Nasm', action='nasm -f elf -o $TARGET $SOURCE', src_suffix='.nasm')   nasm_env = Environment(BUILDERS = [nasm_builder]) # BUILDERS now takes a dictionary, not an array, this must be outdated  nasm_files = 'unix/snapvector unix/ftol'   nasm_objs = [ nasm_env.Nasm(target=x+'.o', source=x+'.nasm') for x in nasm_files.split() ] 

...

 env.Program(target='spam', source = source_list + nasm_objs)

This was inspired by this thread on scons-users

The construction of nasm_objs requires Python 2.0 or newer.

You can also note that instead of doing

nasm_files = [ 'unix/snapvector', 'unix/ftol' ] 

I did

nasm_files = 'unix/snapvector unix/ftol'  nasm_list = nasm_files.split()

that's just a handy trick when the lists of files are pretty long to write

NasmBuilder (last edited 2011-05-24 04:53:21 by 208)