Example #1
0
 def __init__(self, wd):
     ninjafile = '%s/build.ninja' % wd
     buildfile = open(ninjafile, 'w')
     self.n = ninja_syntax.Writer(buildfile)
     self.wd = wd
     self.n.variable('builddir', '%s/binaries' % wd)
     self.code_targets = []
     self.test_targets = []
     self.check_targets = []
Example #2
0
for k, v in sorted(context_excludes.items()):
    if context != k:
        dirs += v

# Because bamboo can't build peacock and we don't want peacock on the sub
if not args.bamboo and context != 'vehicle':
    dirs += ['peacock']

#if not subprocess.getstatusoutput('which go')[0]:
#  dirs.extend([
#    'gocode/src/cuauv.org/shm',
#    'gocode/src/cuauv.org/shm/cli'
#  ])

buildfile = open('build.ninja', 'w')
n = ninja_syntax.Writer(buildfile)

n.comment('This file is used to build the CUAUV software tree.')
n.comment('It is generated by ' + os.path.basename(__file__) + '.')
n.newline()

n.variable('ar', os.environ.get('AR', 'ar'))
n.variable('cxx', os.environ.get('CXX', 'g++'))
n.variable('cc', os.environ.get('CC', 'gcc'))
n.variable('cflags', ' '.join(cflags))
n.variable('cppflags', ' '.join(cppflags))
n.variable('ldflags', ' '.join(ldflags))
n.variable('absdir', os.getcwd())
n.newline()

n.rule('cxx',
Example #3
0
exeext = ''

if platform.system() == 'Windows':
    sdl = find_sdl_win()
    cflags += ['-target', 'x86_64-pc-windows-gnu']
    includes += ['-I ' + os.path.join(sdl, 'include')]
    libdirs += ['-L ' + os.path.join(sdl, 'lib')]
    exeext = '.exe'
else:
    cflags += ['-fPIC']

if platform.system() == 'Linux':
    libs += ['-ldl']

n = ninja_syntax.Writer(open('build.ninja', 'w'))

n.variable('phoenix', thisdir)
n.variable('builddir', '$phoenix/target')

n.variable('cc', 'clang')
n.variable('cpp', 'clang++')
n.variable('cflags', ' '.join(cflags))
n.variable('cppflags', '$cflags ' + ' '.join(cppflags))
n.variable('includes', ' '.join(includes))
n.variable('libdirs', ' '.join(libdirs))
n.variable('libs', ' '.join(libs))

n.newline()

n.rule('cc',