diff --git a/components/SConscript b/components/SConscript index 580b7e19e1..ccc783e638 100644 --- a/components/SConscript +++ b/components/SConscript @@ -1,16 +1,17 @@ # for module compiling import os -Import('RTT_ROOT') Import('remove_components') +from building import * objs = [] -list = os.listdir(os.path.join(RTT_ROOT, 'components')) +cwd = GetCurrentDir() +list = os.listdir(cwd) -for d in list: - if d in remove_components: +for item in list: + if item in remove_components: continue - path = os.path.join(RTT_ROOT, 'components', d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) + + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + objs = objs + SConscript(os.path.join(item, 'SConscript')) Return('objs') diff --git a/components/external/tjpgd1a/SConscript b/components/external/tjpgd1a/SConscript index d5db35385f..8f8200e134 100644 --- a/components/external/tjpgd1a/SConscript +++ b/components/external/tjpgd1a/SConscript @@ -1,13 +1,11 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * -src = Split(''' +cwd = GetCurrentDir() +CPPPATH = [cwd] +src = Split(''' tjpgd.c ''') -CPPPATH = [RTT_ROOT + '/components/external/tjpgd1a'] - group = DefineGroup('tjpgd', src, depend = ['RTGUI_IMAGE_TJPGD'], CPPPATH = CPPPATH) Return('group') diff --git a/components/finsh/SConscript b/components/finsh/SConscript index b6de0a0aae..ee9ded92e8 100644 --- a/components/finsh/SConscript +++ b/components/finsh/SConscript @@ -1,8 +1,8 @@ Import('rtconfig') from building import * -cwd = GetCurrentDir() -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') CPPPATH = [cwd] if rtconfig.CROSS_TOOL == 'keil': LINKFLAGS = ' --keep __fsym_* --keep __vsym_* '