Bläddra i källkod

Add RT_LWIP_VER130, RT_LWIP_VER140 options.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1476 bbd45198-f89e-11dd-88c7-29a3b14d5316
bernard.xiong@gmail.com 14 år sedan
förälder
incheckning
0513333a10
3 ändrade filer med 20 tillägg och 17 borttagningar
  1. 5 5
      components/net/lwip-1.4.0/SConscript
  2. 5 5
      components/net/lwip/SConscript
  3. 10 7
      tools/building.py

+ 5 - 5
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')

+ 5 - 5
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')

+ 10 - 7
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):