2010-04-06 09:02:55 +08:00
|
|
|
Import('env')
|
|
|
|
Import('rtconfig')
|
|
|
|
Import('RTT_ROOT')
|
2010-04-19 12:43:15 +08:00
|
|
|
Import('projects')
|
2010-04-06 09:02:55 +08:00
|
|
|
|
|
|
|
src_local = Split("""
|
|
|
|
modbus/mb.c
|
|
|
|
modbus/mbmaster.c
|
|
|
|
modbus/ascii/mbascii.c
|
|
|
|
modbus/functions/mbfunccoils.c
|
|
|
|
modbus/functions/mbfuncdiag.c
|
|
|
|
modbus/functions/mbfuncdisc.c
|
|
|
|
modbus/functions/mbfuncholding.c
|
|
|
|
modbus/functions/mbfuncinput.c
|
|
|
|
modbus/functions/mbfuncother.c
|
|
|
|
modbus/functions/mbutils.c
|
|
|
|
modbus/port/demo.c
|
|
|
|
modbus/port/port.c
|
|
|
|
modbus/port/portevent.c
|
|
|
|
modbus/port/portserial.c
|
|
|
|
modbus/port/porttimer.c
|
|
|
|
modbus/rtu/mbcrc.c
|
|
|
|
modbus/rtu/mbrtu.c
|
|
|
|
modbus/tcp/mbtcp.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
2010-04-19 12:43:15 +08:00
|
|
|
path = [RTT_ROOT + '/components/net/freemodbus/modbus/include',
|
|
|
|
RTT_ROOT + '/components/net/freemodbus/modbus/port',
|
|
|
|
RTT_ROOT + '/components/net/freemodbus/modbus/rtu',
|
|
|
|
RTT_ROOT + '/components/net/freemodbus/modbus/ascii']
|
2010-04-06 09:02:55 +08:00
|
|
|
|
2010-04-19 12:43:15 +08:00
|
|
|
# group definitions
|
|
|
|
group = {}
|
|
|
|
group['name'] = 'FreeModBus'
|
|
|
|
group['src'] = File(src_local)
|
|
|
|
group['CCFLAGS'] = ''
|
|
|
|
group['CPPPATH'] = path
|
|
|
|
group['CPPDEFINES'] = ''
|
|
|
|
group['LINKFLAGS'] = ''
|
2010-04-06 09:02:55 +08:00
|
|
|
|
2010-04-19 12:43:15 +08:00
|
|
|
# add group to project list
|
|
|
|
projects.append(group)
|
2010-04-06 09:02:55 +08:00
|
|
|
|
2010-04-19 12:43:15 +08:00
|
|
|
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')
|