Makefile 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. -include ../../Rules.make
  2. export PATH=/bin:/sbin:/usr/bin:$(SDK_PATH_TARGET)/usr/bin:$PATH
  3. #define library variable
  4. Lib_SQLite3 = "-L../../../Modularization/ocppfiles" -lsqlite3
  5. Lib_RatedCurrentLib = "-L./" -lm -lModule_RatedCurrent
  6. Lib_Xml = "-L../GPL/libxml2-2.7.6/release/lib" -lxml2
  7. Lib_Openssl = "-L../GPL/openssl-1.1.1n/release/lib" -lssl
  8. all: clean Module_RFIDLib Module_SystexLib Infypwr_PsuCommObj Phihong_PsuCommObj Module_RatedCurrentLib Module_UpgradeLib UUpwr_PsuCommObj \
  9. Module_Wifi Module_4g WebServiceLib Module_EventLogging Module_ProduceUtils Module_DcMeter Module_PowerSharing_Task Module_Firewall \
  10. Ocpp16 Ocpp20 Ocppph \
  11. Module_Payment Module_Payment_Bazel8 Module_Payment_Enegate
  12. clean:
  13. rm -f libModule_RFID.a
  14. rm -f Module_Wifi
  15. rm -f Module_4g
  16. rm -f WebService
  17. rm -f logPackTools
  18. rm -f OcppBackend
  19. rm -f OcppBackendPH
  20. rm -f libPhihong_PsuCommObj.a
  21. rm -f libModule_Upgrade.a
  22. rm -f libInfypwr_PsuCommObj.a
  23. rm -f libUUpwr_PsuCommObj.a
  24. rm -f Module_ProduceUtils
  25. rm -f Module_PhBackend
  26. rm -f OcppBackend20
  27. rm -f Module_DcMeter
  28. rm -f Module_PowerSharing
  29. Module_ProduceUtils:
  30. @echo "===== Module_ProduceUtils =========================================="
  31. rm -f Module_ProduceUtils
  32. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -I ../Projects -o Module_ProduceUtils.o Module_ProduceUtils.c
  33. $(CC) -o Module_ProduceUtils Module_ProduceUtils.o
  34. rm -f Module_ProduceUtils.o
  35. mv -f Module_ProduceUtils ../rootfs/root
  36. Module_RatedCurrentLib:
  37. @echo "===== Module_RatedCurrentLib ======================================="
  38. rm -f libModule_RatedCurrent.a
  39. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_RatedCurrent.o Module_RatedCurrent.c
  40. $(AR) -r libModule_RatedCurrent.a Module_RatedCurrent.o
  41. rm -f Module_RatedCurrent.o
  42. Module_RFIDLib:
  43. @echo "===== Module_RFIDLib ==============================================="
  44. rm -f libModule_RFID.a
  45. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_RFID.o Module_RFID.c
  46. $(AR) -r libModule_RFID.a Module_RFID.o
  47. rm -f Module_RFID.o
  48. Module_SystexLib:
  49. @echo "===== Module_SystexLib ============================================="
  50. rm -f libModule_Systex.a
  51. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_Systex.o Module_Systex.c
  52. $(AR) -r libModule_Systex.a Module_Systex.o
  53. rm -f Module_Systex.o
  54. Module_Wifi:
  55. @echo "===== Module_Wifi =================================================="
  56. rm -f Module_Wifi
  57. $(CC) -D $(Project) -I ../Projects -I .//ocppfiles -I ../GPL/json-c-json-c-0.13.1-20180305/release/include -O0 -Wall -c -fmessage-length=0 -o Module_Wifi.o Module_Wifi.c
  58. $(CC) -o Module_Wifi Module_Wifi.o ${Lib_SQLite3} -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -ljson-c
  59. rm -f Module_Wifi.o
  60. mv -f Module_Wifi ../rootfs/root
  61. Module_4g:
  62. @echo "===== Module_4g ==================================================="
  63. rm -f Module_4g
  64. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_4g.o Module_4g.c
  65. $(CC) -o Module_4g Module_4g.o
  66. rm -f Module_4g.o
  67. mv -f Module_4g ../rootfs/root
  68. WebServiceLib:
  69. @echo "===== WebServiceLib =============================================="
  70. rm -f WebService
  71. $(CC) -D $(Project) -I ../GPL/json-c-json-c-0.13.1-20180305/release/include/json-c -I ../Projects -O0 -Wall -c -fmessage-length=0 -o WebService.o -ljson-c -lm -w WebService.c
  72. $(CC) -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -o WebService WebService.o -ljson-c -lm
  73. rm -f WebService.o
  74. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o logPackTools.o logPackTools.c
  75. $(CC) -o logPackTools logPackTools.o
  76. rm -f logPackTools.o
  77. mv -f WebService ../rootfs/root/
  78. mv -f logPackTools ../rootfs/root/
  79. Ocppph:
  80. @echo "===== Ocppph ====================================================="
  81. rm -f OcppBackendPH;
  82. $(CC) -D $(TLS_EXPIRED) -D $(Project) "-Wl,-rpath-link,../GPL/openssl-1.1.1n/release/lib" -D__USE_XOPEN -D_GNU_SOURCE ./ocppph/Module_OcppBackend.c ./ocppph/MessageHandler.c ./ocppph/JsonParser.c ./ocppph/SystemLogMessage.c ./ocppph/hashmap.c ./ocppph/common.c -I ../Projects -I ../GPL/libwebsockets-2.2.2-stable/release/include -I ../GPL/json-c-json-c-0.13.1-20180305/release/include -include ./Module_RatedCurrent.h -L ../GPL/libwebsockets-2.2.2-stable/release/lib -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -L ./ -lwebsockets -lrt -luuid -lpthread -lc -lsqlite3 -ljson-c ${Lib_Openssl} ${Lib_RatedCurrentLib} -o OcppBackendPH
  83. mv -f OcppBackendPH ../rootfs/root/
  84. Ocpp16:
  85. @echo "===== Ocpp16 ====================================================="
  86. rm -f OcppBackend;
  87. $(CC) -D $(TLS_EXPIRED) -D $(Project) "-Wl,-rpath-link,../GPL/openssl-1.1.1n/release/lib" -D__USE_XOPEN -D_GNU_SOURCE ./ocppfiles/Module_OcppBackend.c ./ocppfiles/MessageHandler.c ./ocppfiles/JsonParser.c ./ocppfiles/SystemLogMessage.c ./ocppfiles/hashmap.c ./ocppfiles/common.c -I ../Projects -I ../GPL/libwebsockets-2.2.2-stable/release/include -I ../GPL/json-c-json-c-0.13.1-20180305/release/include -include ./Module_RatedCurrent.h -L ../GPL/libwebsockets-2.2.2-stable/release/lib -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -L ./ -lwebsockets -lrt -luuid -lpthread -lc -lsqlite3 -ljson-c ${Lib_Openssl} ${Lib_RatedCurrentLib} -o OcppBackend
  88. mv -f OcppBackend ../rootfs/root/
  89. Ocpp20:
  90. @echo "===== Ocpp20 ====================================================="
  91. rm -f OcppBackend20;
  92. $(CC) -D $(TLS_EXPIRED) -D $(Project) "-Wl,-rpath-link,../GPL/openssl-1.1.1n/release/lib" -D__USE_XOPEN -D_GNU_SOURCE ./ocpp20/Module_OcppBackend20.c ./ocpp20/MessageHandler.c ./ocpp20/JsonParser.c ./ocpp20/SystemLogMessage.c ./ocpp20/hashmap.c ./ocpp20/common.c -I ../Projects -I ../GPL/libwebsockets-2.2.2-stable/release/include -I ../GPL/json-c-json-c-0.13.1-20180305/release/include -include ./Module_RatedCurrent.h -L ../GPL/libwebsockets-2.2.2-stable/release/lib -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -L ./ -lwebsockets -lrt -luuid -lpthread -lc -lsqlite3 -ljson-c ${Lib_Openssl} ${Lib_RatedCurrentLib} -o OcppBackend20
  93. mv -f OcppBackend20 ../rootfs/root/
  94. Phihong_PsuCommObj:
  95. @echo "===== Module_PsuCommObj =========================================="
  96. rm -f libPhihong_PsuCommObj.a
  97. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Phihong_PsuCommObj.o Phihong_PsuCommObj.c
  98. $(AR) -r libPhihong_PsuCommObj.a Phihong_PsuCommObj.o
  99. rm -f Phihong_PsuCommObj.o
  100. Infypwr_PsuCommObj:
  101. @echo "===== Infypwr_PsuCommObj =========================================="
  102. rm -f libInfypwr_PsuCommObj.a
  103. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Infypwr_PsuCommObj.o Infypwr_PsuCommObj.c
  104. $(AR) -r libInfypwr_PsuCommObj.a Infypwr_PsuCommObj.o
  105. rm -f Infypwr_PsuCommObj.o
  106. UUpwr_PsuCommObj:
  107. rm -f libUUpwr_PsuCommObj.a
  108. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o UUpwr_PsuCommObj.o UUpwr_PsuCommObj.c
  109. $(AR) -r libUUpwr_PsuCommObj.a UUpwr_PsuCommObj.o
  110. rm -f UUpwr_PsuCommObj.o
  111. Module_UpgradeLib:
  112. @echo "===== Module_UpgradeLib =========================================="
  113. rm -f libModule_Upgrade.a
  114. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_Upgrade.o Module_Upgrade.c
  115. $(AR) -r libModule_Upgrade.a Module_Upgrade.o
  116. rm -f Module_Upgrade.o
  117. Module_EventLogging:
  118. @echo "===== Module_EventLogging ========================================"
  119. rm -f Module_EventLogging
  120. $(CC) -D $(Project) -I ../Projects -I ./ocppfiles -O0 -Wall -c -fmessage-length=0 -o Module_EventLogging.o Module_EventLogging.c
  121. $(CC) -L ./ocppfiles -lsqlite3 -o Module_EventLogging Module_EventLogging.o
  122. rm -f Module_EventLogging.o
  123. mv -f Module_EventLogging ../rootfs/root
  124. Module_PhBackend:
  125. @echo "===== Module_PhBackend ==========================================="
  126. rm -f Module_Phbackend
  127. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_PhBackend.o Module_PhBackend.c
  128. $(CC) -o Module_PhBackend Module_PhBackend.o ${Lib_RatedCurrentLib}
  129. rm -f Module_PhBackend.o
  130. mv -f Module_PhBackend ../rootfs/root
  131. Module_InitUpgrade:
  132. @echo "===== Module_InitUpgrade ========================================="
  133. rm -f Module_InitUpgrade
  134. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_InitUpgrade.o Module_InitUpgrade.c
  135. $(CC) -o Module_InitUpgrade Module_InitUpgrade.o
  136. rm -f Module_InitUpgrade.o
  137. mv -f Module_InitUpgrade ../rootfs/root
  138. Module_Payment:
  139. @echo "===== Module_Payment ============================================="
  140. rm -f Module_Payment
  141. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_Payment.o Module_Payment.c
  142. $(CC) -o Module_Payment Module_Payment.o
  143. rm -f Module_Payment.o
  144. mv -f Module_Payment ../rootfs/root
  145. Module_Payment_Bazel8:
  146. @echo "===== Module_Payment_Bazel8 ======================================"
  147. rm -f Module_Payment_Bazel8
  148. $(CC) -D $(Project) -I ../Projects -I ../GPL/libxml2-2.7.6/release/include/libxml2 -O0 -Wall -c -fmessage-length=0 -o Module_Payment_Bazel8.o Module_Payment_Bazel8.c
  149. $(CC) -o Module_Payment_Bazel8 Module_Payment_Bazel8.o -lrt ${Lib_Xml}
  150. rm -f Module_Payment_Bazel8.o
  151. mv -f Module_Payment_Bazel8 ../rootfs/root
  152. Module_Payment_Enegate:
  153. @echo "===== Module_Payment_Enegate ===================================="
  154. rm -f Module_Payment_Enegate
  155. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -include ./Module_RatedCurrent.h -o Module_Payment_Enegate.o Module_Payment_Enegate.c
  156. $(CC) -o Module_Payment_Enegate Module_Payment_Enegate.o -lrt ${Lib_RatedCurrentLib}
  157. rm -f Module_Payment_Enegate.o
  158. mv -f Module_Payment_Enegate ../rootfs/root
  159. Module_DcMeter:
  160. @echo "===== Module_DcMeter ============================================="
  161. rm -f Module_DcMeter;
  162. $(CC) -D $(Project) "-Wl,-rpath-link,../GPL/openssl-1.1.1n/release/lib" ./DcMeter/Module_DcMeter.c ./DcMeter/meterComm.c ./DcMeter/curlApi.c ./DcMeter/SystemLogMessage.c -I ./ -I ../Projects -I ../GPL/curl-7.61.1/release/include -I ../GPL/json-c-json-c-0.13.1-20180305/release/include -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -L ../GPL/curl-7.61.1/release/lib -ljson-c -lcurl -lssl -o Module_DcMeter ${Lib_RatedCurrentLib}
  163. mv -f Module_DcMeter ../rootfs/root/
  164. Module_PCBTest:
  165. @echo "===== Module_PCBTest ============================================="
  166. rm -f Module_PCBTest
  167. $(CC) -o Module_PCBTest ./PCBTest/Module_PCBTest.c ./PCBTest/Comm_Test.c ./PCBTest/Ethernet_Test.c ./PCBTest/IO_Test.c ./PCBTest/PrimaryMCU_Test.c ./PCBTest/Storage_Test.c -I ./
  168. mv -f Module_PCBTest ../rootfs/root
  169. Module_PowerSharing_Task:
  170. @echo "===== Module_PowerSharing_Task ==================================="
  171. rm -f Module_PowerSharing
  172. $(CC) -D $(Project) "-I../Projects" "-I./ocppfiles" "-include./Module_RatedCurrent.h" -O0 -Wall -fmessage-length=0 Module_PowerSharing.c ${Lib_RatedCurrentLib} -lm -lrt -o Module_PowerSharing
  173. rm -f *.o
  174. mv -f Module_PowerSharing ../rootfs/root
  175. Module_Firewall:
  176. @echo "===== Module_Firewall_Task ======================================="
  177. rm -f Module_Firewall
  178. $(CC) -D $(Project) "-I../Projects" -O0 -Wall -fmessage-length=0 ./Firewall/Module_Firewall.c ./Firewall/yuarel.c -lrt -o Module_Firewall
  179. rm -f *.o
  180. mv -f Module_Firewall ../rootfs/root