mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 01:07:21 +00:00
cleanup scons building script
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1065 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user