summaryrefslogtreecommitdiff
path: root/components/net
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-11-20 12:31:00 +0000
committer[email protected] <[email protected]>2010-11-20 12:31:00 +0000
commit10732a76e9a3bf1ead47cf9848c6838236e4e343 (patch)
tree7475b1f6ff77e80bd357fc551de80565c9486080 /components/net
parent2fce1a91e2577f06b68151dffa15558750346d02 (diff)
cleanup scons building script
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1065 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/net')
-rw-r--r--components/net/apps/SConscript11
-rw-r--r--components/net/freemodbus/SConscript27
-rw-r--r--components/net/lwip/SConscript27
3 files changed, 12 insertions, 53 deletions
diff --git a/components/net/apps/SConscript b/components/net/apps/SConscript
index b0e7fb2716..a0822b53fa 100644
--- a/components/net/apps/SConscript
+++ b/components/net/apps/SConscript
@@ -1,10 +1,7 @@
-Import('env')
-Import('rtconfig')
Import('RTT_ROOT')
+from building import *
-# The set of source files associated with this SConscript file.
-src_local = Glob('*.c')
+src = Glob('*.c')
+group = DefineGroup('netutils', src, depend = ['RT_USING_NETUTILS'])
-obj = env.Object(src_local)
-
-Return('obj') \ No newline at end of file
+Return('group')
diff --git a/components/net/freemodbus/SConscript b/components/net/freemodbus/SConscript
index 61e254bb2b..588f31b458 100644
--- a/components/net/freemodbus/SConscript
+++ b/components/net/freemodbus/SConscript
@@ -1,9 +1,7 @@
-Import('env')
-Import('rtconfig')
Import('RTT_ROOT')
-Import('projects')
+from building import *
-src_local = Split("""
+src = Split("""
modbus/mb.c
modbus/mbmaster.c
modbus/ascii/mbascii.c
@@ -30,23 +28,6 @@ path = [RTT_ROOT + '/components/net/freemodbus/modbus/include',
RTT_ROOT + '/components/net/freemodbus/modbus/rtu',
RTT_ROOT + '/components/net/freemodbus/modbus/ascii']
-# group definitions
-group = {}
-group['name'] = 'FreeModBus'
-group['src'] = File(src_local)
-group['CCFLAGS'] = ''
-group['CPPPATH'] = path
-group['CPPDEFINES'] = ''
-group['LINKFLAGS'] = ''
+group = DefineGroup('FreeModbus', src, depend = ['RT_USING_FREEMODBUS'], CPPPATH = path)
-# add group to project list
-projects.append(group)
-
-env.Append(CCFLAGS = group['CCFLAGS'])
-env.Append(CPPPATH = group['CPPPATH'])
-env.Append(CPPDEFINES = group['CPPDEFINES'])
-env.Append(LINKFLAGS = group['LINKFLAGS'])
-
-objs = env.Object(group['src'])
-
-Return('objs')
+Return('group')
diff --git a/components/net/lwip/SConscript b/components/net/lwip/SConscript
index 3f0197fd9d..496b915f01 100644
--- a/components/net/lwip/SConscript
+++ b/components/net/lwip/SConscript
@@ -1,9 +1,7 @@
-Import('env')
-Import('rtconfig')
Import('RTT_ROOT')
-Import('projects')
+from building import *
-src_local = Split("""
+src = Split("""
src/api/api_lib.c
src/api/api_msg.c
src/api/err.c
@@ -68,23 +66,6 @@ path = [RTT_ROOT + '/components/net/lwip/src',
RTT_ROOT + '/components/net/lwip/src/include/netif',
RTT_ROOT + '/components/net/lwip/src/netif/ppp']
-# group definitions
-group = {}
-group['name'] = 'LwIP'
-group['src'] = File(src_local)
-group['CCFLAGS'] = ''
-group['CPPPATH'] = path
-group['CPPDEFINES'] = ''
-group['LINKFLAGS'] = ''
+group = DefineGroup('LwIP', src, depend = ['RT_USING_LWIP'], CPPPATH = path)
-# add group to project list
-projects.append(group)
-
-env.Append(CCFLAGS = group['CCFLAGS'])
-env.Append(CPPPATH = group['CPPPATH'])
-env.Append(CPPDEFINES = group['CPPDEFINES'])
-env.Append(LINKFLAGS = group['LINKFLAGS'])
-
-obj = env.Object(group['src'])
-
-Return('obj')
+Return('group')