PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/firmware/tests/T3-Steppers/SConstruct

http://github.com/makerbot/G3Firmware
#! | 26 lines | 20 code | 6 blank | 0 comment | 0 complexity | 01b55e9742f5b32f5ebf713bb5d494de MD5 | raw file
 1# Parameters
 2platform = 'test'
 3
 4src_dir = '../../src'
 5build_dir = 'build/'+platform+'/core'
 6VariantDir(build_dir,src_dir)
 7
 8test_src_dir='src'
 9test_build_dir='build/'+platform+'/test'
10VariantDir(test_build_dir,test_src_dir)
11
12gtest_home = '..'
13
14flags='-I'+src_dir+'/'+platform+' -I'+src_dir+'/shared -I'+gtest_home+'/include'
15link_flags = '-L'+gtest_home+'/lib -lgtest -lgtest_main'
16
17srcs = Split("""
18	%(src)s/shared/Packet.cc
19	%(src)s/%(platform)s/UART.cc
20""" % { 'platform':platform, 'src':build_dir, 'test':test_build_dir })
21
22env=Environment(CCFLAGS=flags,LINKFLAGS=link_flags)
23env['ENV']['LD_LIBRARY_PATH'] = gtest_home+'/lib'
24test=env.Program([test_build_dir+'/T3-Steppers-exerciser.cc']+srcs)
25run_alias = env.Alias('run', [test[0]], test[0].path)
26AlwaysBuild(run_alias)