summaryrefslogtreecommitdiff
path: root/components/net/freemodbus/SConscript
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/freemodbus/SConscript
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/freemodbus/SConscript')
-rw-r--r--components/net/freemodbus/SConscript27
1 files changed, 4 insertions, 23 deletions
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')