diff --git a/components/net/lwip-1.4.0/SConscript b/components/net/lwip-1.4.0/SConscript index eeaf673727..bf6aefbef1 100644 --- a/components/net/lwip-1.4.0/SConscript +++ b/components/net/lwip-1.4.0/SConscript @@ -68,10 +68,10 @@ src/netif/ppp/vj.c """) # The set of source files associated with this SConscript file. -path = [RTT_ROOT + '/components/net/lwip-1.4.0/src', - RTT_ROOT + '/components/net/lwip-1.4.0/src/include', - RTT_ROOT + '/components/net/lwip-1.4.0/src/include/ipv4', - RTT_ROOT + '/components/net/lwip-1.4.0/src/arch/include', +path = [RTT_ROOT + '/components/net/lwip-1.4.0/src', + RTT_ROOT + '/components/net/lwip-1.4.0/src/include', + RTT_ROOT + '/components/net/lwip-1.4.0/src/include/ipv4', + RTT_ROOT + '/components/net/lwip-1.4.0/src/arch/include', RTT_ROOT + '/components/net/lwip-1.4.0/src/include/netif'] if GetDepend(['RT_LWIP_SNMP']): @@ -81,6 +81,6 @@ if GetDepend(['RT_LWIP_PPP']): src += ppp_src path += [RTT_ROOT + '/components/net/lwip-1.4.0/src/netif/ppp'] -group = DefineGroup('LwIP', src, depend = ['RT_USING_LWIP'], CPPPATH = path) +group = DefineGroup('LwIP', src, depend = ['RT_USING_LWIP', 'RT_LWIP_VER140'], CPPPATH = path) Return('group') diff --git a/components/net/lwip/SConscript b/components/net/lwip/SConscript index 3bbbe18e10..78b87eb548 100644 --- a/components/net/lwip/SConscript +++ b/components/net/lwip/SConscript @@ -67,10 +67,10 @@ src/netif/ppp/vj.c """) # The set of source files associated with this SConscript file. -path = [RTT_ROOT + '/components/net/lwip/src', - RTT_ROOT + '/components/net/lwip/src/include', - RTT_ROOT + '/components/net/lwip/src/include/ipv4', - RTT_ROOT + '/components/net/lwip/src/arch/include', +path = [RTT_ROOT + '/components/net/lwip/src', + RTT_ROOT + '/components/net/lwip/src/include', + RTT_ROOT + '/components/net/lwip/src/include/ipv4', + RTT_ROOT + '/components/net/lwip/src/arch/include', RTT_ROOT + '/components/net/lwip/src/include/netif'] if GetDepend(['RT_LWIP_SNMP']): @@ -80,6 +80,6 @@ if GetDepend(['RT_LWIP_PPP']): src += ppp_src path += [RTT_ROOT + '/components/net/lwip/src/netif/ppp'] -group = DefineGroup('LwIP', src, depend = ['RT_USING_LWIP'], CPPPATH = path) +group = DefineGroup('LwIP', src, depend = ['RT_USING_LWIP', 'RT_LWIP_VER130'], CPPPATH = path) Return('group') diff --git a/tools/building.py b/tools/building.py index 2fa5786e59..1856b23db9 100644 --- a/tools/building.py +++ b/tools/building.py @@ -91,7 +91,7 @@ def IARProject(target, script): import xml.etree.ElementTree as etree project = file(target, "wb") project_path = os.path.dirname(os.path.abspath(target)) - + tree = etree.parse('template.ewp') tree.write('project.ewp') @@ -262,7 +262,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False): win32_spawn.env = env env['SPAWN'] = win32_spawn.spawn - # add program path + # add program path env.PrependENVPath('PATH', rtconfig.EXEC_PATH) # parse rtconfig.h to get used component @@ -276,6 +276,9 @@ def PrepareBuilding(env, root_directory, has_libcpu=False): if (GetDepend('RT_USING_NEWLIB') == False and GetDepend('RT_USING_NOLIBC') == False) and rtconfig.PLATFORM == 'gcc': AddDepend('RT_USING_MINILIBC') + if (GetDepend('RT_USING_LWIP') == True and GetDepend('RT_LWIP_VER140') == False): + AddDepend('RT_LWIP_VER130') + # add target option AddOption('--target', dest='target', @@ -309,14 +312,14 @@ def GetDepend(depend): building = False return building - - # for list type depend + + # for list type depend for item in depend: if item != '': if not BuildOptions.has_key(item): building = False - return building + return building def AddDepend(option): BuildOptions[option] = 1 @@ -344,11 +347,11 @@ def DefineGroup(name, src, depend, **parameters): if group.has_key('LINKFLAGS'): Env.Append(LINKFLAGS = group['LINKFLAGS']) - objs = Env.Object(group['src']) + objs = Env.Object(group['src']) if group.has_key('LIBRARY'): objs = Env.Library(name, objs) - + return objs def EndBuilding(target):