diff options
| author | Grissiom <[email protected]> | 2015-01-06 18:50:22 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2015-01-07 17:15:49 +0800 |
| commit | f7415e595e613e37c5f7c4cebbc9a67a8eb68592 (patch) | |
| tree | 885822b76b9259de5b5ef288b369ed44d34d5da6 /components/vbus/SConscript | |
| parent | fcff552626079f87889ef4d03cbc25a909b6c71b (diff) | |
VBus: added
Currently only lpc43xx is supported.
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') |
