diff options
| author | Bernard Xiong <[email protected]> | 2015-01-09 10:00:25 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-01-09 10:00:25 +0800 |
| commit | 56ab0995c19690e176f40538bac23558d008e7c1 (patch) | |
| tree | 814b70d9747bae2da58f46f13e42ae7ae19d1055 /components/vbus/SConscript | |
| parent | da139a4a2fdb06949d3bfa3eb9d659b0da58ce1e (diff) | |
| parent | 81b37fb1f90fc57eb28f97ecd32d98642db96b2a (diff) | |
Merge pull request #409 from grissiom/lpc43xx
Lpc43xx
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') |
