diff --git a/components/SConscript b/components/SConscript index 580b7e19e11226bbb97f922f782e24b590cdc498..ccc783e6389f85dabe22ae781c123efe3a69b972 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 d5db35385f0e9f8f44d79d956bf7165609e27a1f..8f8200e13456b9415b7ee396a467c5605cc15be8 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 b6de0a0aae859abb337565c6a99c46c0d8076caf..ee9ded92e89f835761051dcb65b55688cb839c83 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_* '