summaryrefslogtreecommitdiff
path: root/components/net
diff options
context:
space:
mode:
authorarmink <[email protected]>2013-11-06 14:16:24 +0800
committerarmink <[email protected]>2013-11-06 14:16:24 +0800
commit615579ccf129eef0ae2a640a3d94da657a1d0499 (patch)
tree3a5f30afd2be6b27865f3a20840528d3d0ce074e /components/net
parentb280a940c449f8654af977e946f0befe09cf3bc7 (diff)
add SConscript for freemodbus
Signed-off-by: armink <[email protected]>
Diffstat (limited to 'components/net')
-rw-r--r--components/net/freemodbus-v1.6.0/SConscript74
1 files changed, 74 insertions, 0 deletions
diff --git a/components/net/freemodbus-v1.6.0/SConscript b/components/net/freemodbus-v1.6.0/SConscript
new file mode 100644
index 0000000000..77ab37e086
--- /dev/null
+++ b/components/net/freemodbus-v1.6.0/SConscript
@@ -0,0 +1,74 @@
+Import('RTT_ROOT')
+from building import *
+
+src = Split("""
+modbus/functions/mbfuncdiag.c
+modbus/functions/mbutils.c
+modbus/functions/mbfuncother.c
+modbus/rtu/mbcrc.c
+port/port.c
+port/user_mb_app.c
+""")
+
+master_rtu_src = Split("""
+modbus/functions/mbfunccoils_m.c
+modbus/functions/mbfuncdisc_m.c
+modbus/functions/mbfuncholding_m.c
+modbus/functions/mbfuncinput_m.c
+modbus/rtu/mbrtu_m.c
+modbus/mb_m.c
+port/portevent_m.c
+port/portserial_m.c
+port/porttimer_m.c
+""")
+
+slave_rtu_src = Split("""
+modbus/functions/mbfunccoils.c
+modbus/functions/mbfuncdisc.c
+modbus/functions/mbfuncholding.c
+modbus/functions/mbfuncinput.c
+modbus/rtu/mbrtu.c
+modbus/mb.c
+port/portevent.c
+port/portserial.c
+port/porttimer.c
+""")
+
+master_slave_rtu_src = Split("""
+modbus/functions/mbfunccoils.c
+modbus/functions/mbfunccoils_m.c
+modbus/functions/mbfuncdisc.c
+modbus/functions/mbfuncdisc_m.c
+modbus/functions/mbfuncholding.c
+modbus/functions/mbfuncholding_m.c
+modbus/functions/mbfuncinput.c
+modbus/functions/mbfuncinput_m.c
+modbus/rtu/mbrtu.c
+modbus/rtu/mbrtu_m.c
+modbus/mb.c
+modbus/mb_m.c
+port/portevent.c
+port/portevent_m.c
+port/portserial.c
+port/portserial_m.c
+port/porttimer.c
+port/porttimer_m.c
+""")
+
+# The set of source files associated with this SConscript file.
+path = [GetCurrentDir() + '/modbus/include',
+ GetCurrentDir() + '/modbus/rtu',
+ GetCurrentDir() + '/port']
+
+if GetDepend(['RT_MODBUS_MASTER_RTU']):
+ src += master_rtu_src
+
+if GetDepend(['RT_MODBUS_SLAVE_RTU']):
+ src += slave_rtu_src
+
+if GetDepend(['RT_MODBUS_MASTER_SLAVE_RTU']):
+ src += master_slave_rtu_src
+
+group = DefineGroup('FreeModbus', src, depend = ['RT_USING_MODBUS'], CPPPATH = path)
+
+Return('group')