Makefile 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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_SystexLib Module_UpgradeLib Module_Wifi Module_4g WebServiceLib Module_EventLogging
  9. clean:
  10. rm -f libModule_RFID.a
  11. rm -f Module_Wifi
  12. rm -f Module_4g
  13. rm -f WebService
  14. rm -f logPackTools
  15. rm -f OcppBackend
  16. rm -f OcppBackendPH
  17. rm -f libPhihong_PsuCommObj.a
  18. rm -f libModule_Upgrade.a
  19. rm -f libInfypwr_PsuCommObj.a
  20. rm -f libUUpwr_PsuCommObj.a
  21. rm -f Module_ProduceUtils
  22. rm -f Module_PhBackend
  23. rm -f OcppBackend20
  24. rm -f Module_DcMeter
  25. rm -f Module_PowerSharing
  26. Module_ProduceUtils:
  27. @echo "===== Module_ProduceUtils =========================================="
  28. rm -f Module_ProduceUtils
  29. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -I ../Projects -o Module_ProduceUtils.o Module_ProduceUtils.c
  30. $(CC) -o Module_ProduceUtils Module_ProduceUtils.o
  31. rm -f Module_ProduceUtils.o
  32. mv -f Module_ProduceUtils ../rootfs/root
  33. Module_RatedCurrentLib:
  34. @echo "===== Module_RatedCurrentLib ======================================="
  35. rm -f libModule_RatedCurrent.a
  36. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_RatedCurrent.o Module_RatedCurrent.c
  37. $(AR) -r libModule_RatedCurrent.a Module_RatedCurrent.o
  38. rm -f Module_RatedCurrent.o
  39. Module_RFIDLib:
  40. @echo "===== Module_RFIDLib ==============================================="
  41. rm -f libModule_RFID.a
  42. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_RFID.o Module_RFID.c
  43. $(AR) -r libModule_RFID.a Module_RFID.o
  44. rm -f Module_RFID.o
  45. Module_SystexLib:
  46. @echo "===== Module_SystexLib ============================================="
  47. rm -f libModule_Systex.a
  48. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_Systex.o Module_Systex.c
  49. $(AR) -r libModule_Systex.a Module_Systex.o
  50. rm -f Module_Systex.o
  51. Module_Wifi:
  52. @echo "===== Module_Wifi =================================================="
  53. rm -f Module_Wifi
  54. $(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
  55. $(CC) -o Module_Wifi Module_Wifi.o ${Lib_SQLite3} -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -ljson-c
  56. rm -f Module_Wifi.o
  57. mv -f Module_Wifi ../rootfs/root
  58. Module_4g:
  59. @echo "===== Module_4g ==================================================="
  60. rm -f Module_4g
  61. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_4g.o Module_4g.c
  62. $(CC) -o Module_4g Module_4g.o
  63. rm -f Module_4g.o
  64. mv -f Module_4g ../rootfs/root
  65. WebServiceLib:
  66. @echo "===== WebServiceLib =============================================="
  67. rm -f WebService
  68. $(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
  69. $(CC) -L ../GPL/json-c-json-c-0.13.1-20180305/release/lib -o WebService WebService.o -ljson-c -lm
  70. rm -f WebService.o
  71. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o logPackTools.o logPackTools.c
  72. $(CC) -o logPackTools logPackTools.o
  73. rm -f logPackTools.o
  74. mv -f WebService ../rootfs/root/
  75. mv -f logPackTools ../rootfs/root/
  76. Ocppph:
  77. @echo "===== Ocppph ====================================================="
  78. rm -f OcppBackendPH;
  79. $(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
  80. mv -f OcppBackendPH ../rootfs/root/
  81. Ocpp16:
  82. @echo "===== Ocpp16 ====================================================="
  83. rm -f OcppBackend;
  84. $(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
  85. mv -f OcppBackend ../rootfs/root/
  86. Ocpp20:
  87. @echo "===== Ocpp20 ====================================================="
  88. rm -f OcppBackend20;
  89. $(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
  90. mv -f OcppBackend20 ../rootfs/root/
  91. Phihong_PsuCommObj:
  92. @echo "===== Module_PsuCommObj =========================================="
  93. rm -f libPhihong_PsuCommObj.a
  94. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Phihong_PsuCommObj.o Phihong_PsuCommObj.c
  95. $(AR) -r libPhihong_PsuCommObj.a Phihong_PsuCommObj.o
  96. rm -f Phihong_PsuCommObj.o
  97. Infypwr_PsuCommObj:
  98. @echo "===== Infypwr_PsuCommObj =========================================="
  99. rm -f libInfypwr_PsuCommObj.a
  100. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Infypwr_PsuCommObj.o Infypwr_PsuCommObj.c
  101. $(AR) -r libInfypwr_PsuCommObj.a Infypwr_PsuCommObj.o
  102. rm -f Infypwr_PsuCommObj.o
  103. UUpwr_PsuCommObj:
  104. rm -f libUUpwr_PsuCommObj.a
  105. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o UUpwr_PsuCommObj.o UUpwr_PsuCommObj.c
  106. $(AR) -r libUUpwr_PsuCommObj.a UUpwr_PsuCommObj.o
  107. rm -f UUpwr_PsuCommObj.o
  108. Module_UpgradeLib:
  109. @echo "===== Module_UpgradeLib =========================================="
  110. rm -f libModule_Upgrade.a
  111. $(CC) -D $(Project) -O0 -Wall -c -fmessage-length=0 -o Module_Upgrade.o Module_Upgrade.c
  112. $(AR) -r libModule_Upgrade.a Module_Upgrade.o
  113. rm -f Module_Upgrade.o
  114. Module_EventLogging:
  115. @echo "===== Module_EventLogging ========================================"
  116. rm -f Module_EventLogging
  117. $(CC) -D $(Project) -I ../Projects -I ./ocppfiles -O0 -Wall -c -fmessage-length=0 -o Module_EventLogging.o Module_EventLogging.c
  118. $(CC) -L ./ocppfiles -lsqlite3 -o Module_EventLogging Module_EventLogging.o
  119. rm -f Module_EventLogging.o
  120. mv -f Module_EventLogging ../rootfs/root
  121. Module_PhBackend:
  122. @echo "===== Module_PhBackend ==========================================="
  123. rm -f Module_Phbackend
  124. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_PhBackend.o Module_PhBackend.c
  125. $(CC) -o Module_PhBackend Module_PhBackend.o ${Lib_RatedCurrentLib}
  126. rm -f Module_PhBackend.o
  127. mv -f Module_PhBackend ../rootfs/root
  128. Module_InitUpgrade:
  129. @echo "===== Module_InitUpgrade ========================================="
  130. rm -f Module_InitUpgrade
  131. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_InitUpgrade.o Module_InitUpgrade.c
  132. $(CC) -o Module_InitUpgrade Module_InitUpgrade.o
  133. rm -f Module_InitUpgrade.o
  134. mv -f Module_InitUpgrade ../rootfs/root
  135. Module_Payment:
  136. @echo "===== Module_Payment ============================================="
  137. rm -f Module_Payment
  138. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -o Module_Payment.o Module_Payment.c
  139. $(CC) -o Module_Payment Module_Payment.o
  140. rm -f Module_Payment.o
  141. mv -f Module_Payment ../rootfs/root
  142. Module_Payment_Bazel8:
  143. @echo "===== Module_Payment_Bazel8 ======================================"
  144. rm -f Module_Payment_Bazel8
  145. $(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
  146. $(CC) -o Module_Payment_Bazel8 Module_Payment_Bazel8.o -lrt ${Lib_Xml}
  147. rm -f Module_Payment_Bazel8.o
  148. mv -f Module_Payment_Bazel8 ../rootfs/root
  149. Module_Payment_Enegate:
  150. @echo "===== Module_Payment_Enegate ===================================="
  151. rm -f Module_Payment_Enegate
  152. $(CC) -D $(Project) -I ../Projects -O0 -Wall -c -fmessage-length=0 -include ./Module_RatedCurrent.h -o Module_Payment_Enegate.o Module_Payment_Enegate.c
  153. $(CC) -o Module_Payment_Enegate Module_Payment_Enegate.o -lrt ${Lib_RatedCurrentLib}
  154. rm -f Module_Payment_Enegate.o
  155. mv -f Module_Payment_Enegate ../rootfs/root
  156. Module_DcMeter:
  157. @echo "===== Module_DcMeter ============================================="
  158. rm -f Module_DcMeter;
  159. $(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}
  160. mv -f Module_DcMeter ../rootfs/root/
  161. Module_PCBTest:
  162. @echo "===== Module_PCBTest ============================================="
  163. rm -f Module_PCBTest
  164. $(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 ./
  165. mv -f Module_PCBTest ../rootfs/root
  166. Module_PowerSharing_Task:
  167. @echo "===== Module_PowerSharing_Task ==================================="
  168. rm -f Module_PowerSharing
  169. $(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
  170. rm -f *.o
  171. mv -f Module_PowerSharing ../rootfs/root