Makefile 9.9 KB

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