diff options
| author | Arda <[email protected]> | 2015-03-10 12:01:25 +0800 |
|---|---|---|
| committer | Arda <[email protected]> | 2015-03-10 12:01:25 +0800 |
| commit | 4a9c3fae2900da71cdf026063679d2c25f266fd7 (patch) | |
| tree | 2fba8aec09a671cc36d281365351003a988eb57d /components/vbus/SConscript | |
| parent | 5fe489a3949cdbb947d3c719a7ef958a37e8d826 (diff) | |
| parent | 89ceb7dc27895225bc221d22c035d5cc8802a256 (diff) | |
Merge pull request #3 from RT-Thread/master
sync with official source
Diffstat (limited to 'components/vbus/SConscript')
| -rw-r--r-- | components/vbus/SConscript | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/components/vbus/SConscript b/components/vbus/SConscript new file mode 100644 index 0000000000..e9097d19ff --- /dev/null +++ b/components/vbus/SConscript @@ -0,0 +1,29 @@ +# RT-Thread building script for component + +import SCons, os +from building import * + +group = [] +if not GetDepend(['RT_USING_VBUS']): + Return('group') + +cwd = GetCurrentDir() +src = Glob('*.c') + +for c, f in [['RT_USING_VBUS_RFS', 'utilities/rfs.c'], + ['RT_USING_VBUS_RSHELL', 'utilities/rshell.c'], + ]: + if GetDepend(c): + src += Glob(f) + +with open(os.path.join(Dir('#').get_abspath(), 'vbus_local_conf.h'), 'r') as f: + cpp = SCons.cpp.PreProcessor() + cpp.process_contents(f.read()) + if 'RT_VBUS_USING_TESTS' in cpp.cpp_namespace: + src += Glob('tests/*.c') + +CPPPATH = [cwd, os.path.join(cwd, 'share_hdr')] + +group = DefineGroup('VBus', src, depend = ['RT_USING_VBUS'], CPPPATH = CPPPATH) + +Return('group') |
