src/AMBuild.shell
author David Anderson <danderson@mozilla.com>
Thu Jul 26 00:18:37 2012 -0700 (2012-07-26)
changeset 101 04f3450662f4
parent 94 b2862e8a8ae0
child 104 ef7531414fc6
permissions -rw-r--r--
Fix bootstrapping bug.
     1 # vim: set ts=2 sw=2 tw=99 noet ft=python: 
     2 import os
     3 import os.path
     4 import ambuild.osutil as osutil
     5 
     6 compiler = KE.DefaultCompiler()
     7 compiler.AddToListVar('CXXINCLUDES', os.path.join(AMBuild.sourceFolder, 'include'))
     8 
     9 library = osutil.StaticLibPrefix() + 'keima' + osutil.StaticLibSuffix()
    10 library = os.path.join(AMBuild.outputFolder, 'keima', library)
    11 compiler.AddToListVar('POSTLINKFLAGS', library)
    12 
    13 if compiler.cc.name == 'msvc':
    14 	compiler.AddToListVar('POSTLINKFLAGS', '/SUBSYSTEM:CONSOLE')
    15 
    16 job = AMBuild.AddJob('spshell')
    17 binary = Cpp.ExecutableBuilder('spshell', AMBuild, job, compiler)
    18 files = [
    19 	'main.cpp'
    20 	]
    21 
    22 if os.path.exists(library):
    23   binary.RelinkIfNewer(library)
    24 binary.AddSourceFiles('src', files)
    25 binary.SendToJob()
    26