Makefile 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. #topee imx6ull
  2. #CC=/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
  3. #htnice
  4. #CC=/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
  5. #mrzy
  6. #CC=/usr/local/arm/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
  7. #am335x
  8. #CC=aarch64-htnice-linux-gnu-
  9. CC=arm-linux-gnueabihf-
  10. #CC=/home/lxl/usr/local/arm/4.8.3/bin/arm-none-linux-gnueabi-
  11. #CC=arm-poky-linux-gnueabi-
  12. ##CC=arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-x11/4.1.15-2.0.0/sysroots/cortexa7hf-neon-poky-linux-gnueabi
  13. #ubuntu
  14. #CC=
  15. #t3
  16. #. /opt/fsl-imx-x11/4.1.15-2.0.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
  17. #CC=/root/t3/lichee/out/sun8iw11p1/linux/common/buildroot/host/usr/bin/arm-linux-gnueabihf-
  18. #LIBPATHS += -Lcomponent/goahead/build/linux-arm-default/lib
  19. #LIBS += -lgoahead
  20. INCLUDES = $(INCPATH)
  21. SRCFILES = appl/main.c \
  22. appl/appl.c \
  23. appl/cloud/cloud.c \
  24. appl/tb/tb.c \
  25. appl/ems/ems_sm.c \
  26. appl/ems/ems.c \
  27. appl/ems/timeseg.c \
  28. appl/ems/estats.c \
  29. appl/ems/pcurv.c \
  30. appl/event/event.c \
  31. platform/abs/plt.c\
  32. platform/abs/ctn.c\
  33. platform/abs/ess.c\
  34. platform/abs/pcs.c\
  35. platform/abs/pack.c\
  36. platform/abs/meter.c\
  37. platform/abs/ac.c\
  38. platform/abs/dehumi.c\
  39. platform/abs/env.c\
  40. platform/abs/plc.c\
  41. platform/abs/ups.c\
  42. platform/abs/fe.c\
  43. platform/abs/dido.c\
  44. platform/util/misc/misc.c\
  45. platform/util/log/log.c\
  46. platform/util/tool/tool.c\
  47. platform/util/shm/shm.c\
  48. platform/util/mqtt/mqtt_sm.c\
  49. platform/util/mqtt/mqtt.c\
  50. platform/util/mqtt/mqtt_ringbuffer.c\
  51. platform/util/mqtt/mqtt_cache.c\
  52. platform/util/tbmqtt/tbmqtt_sm.c\
  53. platform/util/tbmqtt/tbmqtt.c\
  54. platform/util/tbmqtt/tbmqtt_ringbuffer.c\
  55. platform/util/tbmqtt/tbmqtt_cache.c\
  56. platform/util/comm/comm.c\
  57. platform/util/statemachine/sm.c\
  58. platform/device/chan/chan.c\
  59. platform/device/chan/chan_serial_ringbuffer.c\
  60. platform/device/chan/chan_socketcan_ringbuffer.c\
  61. platform/device/chan/chan_tcpservcan_ringbuffer.c\
  62. platform/device/chan/mbs.c\
  63. platform/device/ctn/cess2000_sm.c\
  64. platform/device/ctn/cess2000.c\
  65. platform/device/ctn/cell280_sm.c\
  66. platform/device/ctn/cell280.c\
  67. platform/device/ctn/zh200_comm.c\
  68. platform/device/ctn/zh200_sm.c\
  69. platform/device/ctn/zh200.c\
  70. platform/device/pcs/ies/ies1000_comm.c\
  71. platform/device/pcs/ies/ies1000_sm.c\
  72. platform/device/pcs/ies/ies1000.c\
  73. platform/device/pcs/itech/it6000_comm.c\
  74. platform/device/pcs/itech/it6000_sm.c\
  75. platform/device/pcs/itech/it6000.c\
  76. platform/device/pack/catl280a/catl280a_comm.c\
  77. platform/device/pack/catl280a/catl280a_sm.c\
  78. platform/device/pack/catl280a/catl280a.c\
  79. platform/device/pack/KL/KL_level2/KL_CommunicationIf_level2.c\
  80. platform/device/pack/KL/KL_level3/KL_CommunicationIf_level3.c\
  81. platform/device/pack/gt/gt_comm.c\
  82. platform/device/pack/gt/gt_sm.c\
  83. platform/device/pack/gt/gt.c\
  84. platform/device/pack/KL/KL_CommunicationIf.c\
  85. platform/device/pack/KL/KL_Function.c\
  86. platform/device/pack/KL/KL_StateMachine.c\
  87. platform/device/ac/mc90hdnc1a_comm.c\
  88. platform/device/ac/mc90hdnc1a_sm.c\
  89. platform/device/ac/mc90hdnc1a.c\
  90. platform/device/ac/mc0051gs_comm.c\
  91. platform/device/ac/mc0051gs_sm.c\
  92. platform/device/ac/mc0051gs.c\
  93. platform/device/meter/abb_b23_4_comm.c\
  94. platform/device/meter/abb_b23_4_sm.c\
  95. platform/device/meter/abb_b23_4.c\
  96. platform/device/meter/dtsd1352_comm.c\
  97. platform/device/meter/dtsd1352_sm.c\
  98. platform/device/meter/dtsd1352.c\
  99. platform/device/meter/dlt645_comm.c\
  100. platform/device/meter/dlt645_sm.c\
  101. platform/device/meter/dlt645.c\
  102. platform/device/meter/dlt645_api_07.c\
  103. platform/device/meter/adl200_comm.c\
  104. platform/device/meter/adl200_sm.c\
  105. platform/device/meter/adl200.c\
  106. platform/device/env/rs_ws_n/rs_ws_n_comm.c\
  107. platform/device/env/rs_ws_n/rs_ws_n_sm.c\
  108. platform/device/env/rs_ws_n/rs_ws_n.c\
  109. platform/device/env/rh811ad053f/rh811ad053f_comm.c\
  110. platform/device/env/rh811ad053f/rh811ad053f_sm.c\
  111. platform/device/env/rh811ad053f/rh811ad053f.c\
  112. platform/device/env/cd1f3300/cd1f3300_comm.c\
  113. platform/device/env/cd1f3300/cd1f3300_sm.c\
  114. platform/device/env/cd1f3300/cd1f3300.c\
  115. platform/device/env/sga500e/sga500e_comm.c\
  116. platform/device/env/sga500e/sga500e_sm.c\
  117. platform/device/env/sga500e/sga500e.c\
  118. platform/device/plc/simatic_s7_comm.c\
  119. platform/device/plc/simatic_s7_sm.c\
  120. platform/device/plc/simatic_s7.c\
  121. platform/device/ups/e3ks_s_comm.c\
  122. platform/device/ups/e3ks_sm.c\
  123. platform/device/ups/e3ks.c\
  124. platform/device/mac/mac.c\
  125. platform/device/pcs/sh/pws1_comm.c\
  126. platform/device/pcs/sh/pws1_sm.c\
  127. platform/device/pcs/sh/pws1.c\
  128. platform/device/pcs/n9/n9_comm.c\
  129. platform/device/pcs/n9/n9_sm.c\
  130. platform/device/pcs/n9/n9.c\
  131. platform/device/fe/yf2825_comm.c\
  132. platform/device/fe/yf2825_sm.c\
  133. platform/device/fe/yf2825.c\
  134. platform/device/dehumi/sdcs_comm.c\
  135. platform/device/dehumi/sdcs_sm.c\
  136. platform/device/dehumi/sdcs.c \
  137. platform/device/dido/dido_zlgmcu_comm.c\
  138. platform/device/dido/dido_zlgmcu_sm.c\
  139. platform/device/dido/dido_zlgmcu.c\
  140. appl/sta/sta_sm.c\
  141. appl/sta/sta.c
  142. COMPONENTS = component/freemodbus/modbus/ascii/mbascii.c \
  143. component/freemodbus/modbus/functions/mbfunccoils.c \
  144. component/freemodbus/modbus/functions/mbfuncdiag.c \
  145. component/freemodbus/modbus/functions/mbfuncdisc.c \
  146. component/freemodbus/modbus/functions/mbfuncholding.c \
  147. component/freemodbus/modbus/functions/mbfuncinput.c \
  148. component/freemodbus/modbus/functions/mbfuncother.c \
  149. component/freemodbus/modbus/functions/mbutils.c \
  150. component/freemodbus/modbus/rtu/mbcrc.c \
  151. component/freemodbus/modbus/rtu/mbrtu.c \
  152. component/freemodbus/modbus/tcp/mbtcp.c \
  153. component/freemodbus/modbus/mb.c \
  154. component/freemodbus/port/portevent.c \
  155. component/freemodbus/port/portother.c \
  156. component/freemodbus/port/portserial.c \
  157. component/freemodbus/port/porttcp.c \
  158. component/freemodbus/port/porttimer.c \
  159. component/libmodbus/src/modbus.c \
  160. component/libmodbus/src/modbus-data.c \
  161. component/libmodbus/src/modbus-rtu.c \
  162. component/libmodbus/src/modbus-tcp.c \
  163. component/sqlite/sqlite3.c \
  164. component/zlog/buf.c \
  165. component/zlog/category.c \
  166. component/zlog/category_table.c \
  167. component/zlog/conf.c \
  168. component/zlog/event.c \
  169. component/zlog/format.c \
  170. component/zlog/level.c \
  171. component/zlog/level_list.c \
  172. component/zlog/mdc.c \
  173. component/zlog/record.c \
  174. component/zlog/record_table.c \
  175. component/zlog/rotater.c \
  176. component/zlog/rule.c \
  177. component/zlog/spec.c \
  178. component/zlog/thread.c \
  179. component/zlog/zc_arraylist.c \
  180. component/zlog/zc_hashtable.c \
  181. component/zlog/zc_profile.c \
  182. component/zlog/zc_util.c \
  183. component/zlog/zlog.c \
  184. component/cJSON/cJSON.c \
  185. component/paho.mqtt.c-1.3.9/src/Base64.c \
  186. component/paho.mqtt.c-1.3.9/src/Clients.c \
  187. component/paho.mqtt.c-1.3.9/src/Heap.c \
  188. component/paho.mqtt.c-1.3.9/src/LinkedList.c \
  189. component/paho.mqtt.c-1.3.9/src/Log.c \
  190. component/paho.mqtt.c-1.3.9/src/Messages.c \
  191. component/paho.mqtt.c-1.3.9/src/MQTTClient.c \
  192. component/paho.mqtt.c-1.3.9/src/MQTTPacket.c \
  193. component/paho.mqtt.c-1.3.9/src/MQTTPacketOut.c \
  194. component/paho.mqtt.c-1.3.9/src/MQTTPersistence.c \
  195. component/paho.mqtt.c-1.3.9/src/MQTTPersistenceDefault.c \
  196. component/paho.mqtt.c-1.3.9/src/MQTTProperties.c \
  197. component/paho.mqtt.c-1.3.9/src/MQTTProtocolClient.c \
  198. component/paho.mqtt.c-1.3.9/src/MQTTProtocolOut.c \
  199. component/paho.mqtt.c-1.3.9/src/MQTTReasonCodes.c \
  200. component/paho.mqtt.c-1.3.9/src/MQTTTime.c \
  201. component/paho.mqtt.c-1.3.9/src/OsWrapper.c \
  202. component/paho.mqtt.c-1.3.9/src/SHA1.c \
  203. component/paho.mqtt.c-1.3.9/src/Socket.c \
  204. component/paho.mqtt.c-1.3.9/src/SocketBuffer.c \
  205. component/paho.mqtt.c-1.3.9/src/SSLSocket.c \
  206. component/paho.mqtt.c-1.3.9/src/StackTrace.c \
  207. component/paho.mqtt.c-1.3.9/src/Thread.c \
  208. component/paho.mqtt.c-1.3.9/src/Tree.c \
  209. component/paho.mqtt.c-1.3.9/src/utf-8.c \
  210. component/paho.mqtt.c-1.3.9/src/WebSocket.c\
  211. SRC = $(shell find platform/ -name "*.c") $(shell find appl/ -name "*.c") $(COMPONENTS)
  212. INCLUDES = $(addprefix -I,$(shell find appl/ -type d -print)) $(addprefix -I,$(shell find platform/ -type d -print)) $(addprefix -I,$(shell find component/ -type d -print))
  213. all:
  214. $(CC)gcc $(SRCFILES) $(COMPONENTS) $(INCLUDES) $(LIBPATHS) $(LIBS) -lpthread -lm -lrt -ldl -w -g -o bin/stad
  215. dev:
  216. $(CC) $(SRC) $(INCLUDES) $(LIBPATHS) $(LIBS) -DDEV -lpthread -lm -lrt -ldl -w -g -o bin/stad
  217. debug:
  218. gcc $(SRC) $(INCLUDES) $(LIBPATHS) $(LIBS) -DDEV -lpthread -lm -lrt -ldl -w -g -o bin/stad
  219. clean:
  220. rm ./bin/stad