Makefile 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. -include ../../../../Rules.make
  2. export PATH=/bin:/sbin:/usr/bin:$(SDK_PATH_TARGET)/usr/bin:$PATH
  3. #define library variable
  4. Internal485ProtocolLib = -L ../../../Modularization/Internal485Protocol -lInternal485Protocol
  5. #PsuCommProtocolLib = -L ../../../Modularization/PsuCommProtocol -lPsuCommProtocol
  6. #define library variable
  7. Lib_Module_RFID = "-L../../../Modularization" -lModule_RFID
  8. Lib_Module_Upgrade = "-L../../../Modularization" -lModule_Upgrade
  9. Lib_SQLite3 = "-L../../../Modularization/ocppfiles" -lsqlite3
  10. all: CopyFile apps Clean
  11. #apps: Module_CSU Module_EvComm Module_EventLogging Module_InternalComm Module_LcmControl Module_PrimaryComm Module_PsuComm
  12. # ReadCmdline kill.sh
  13. apps: Common MainTask CabinetParallel SelfTestTask AuthorizeTask LedIndication EvCommTask EventLoggingTask InternalCommTask LcmControlTask PrimaryCommTask InfyGroup_PsuCommObj PhGroup_PsuCommObj PsuCommTask PhPsuCommTask ReadCmdlineTask DispenserDiagnostics FactoryConfigApp OtherTools
  14. Common:
  15. rm -f Common.o
  16. $(CC) -D $(Project) -includeCommon.h -O0 -g3 -Wall -c -fmessage-length=0 -o Common.o Common.c
  17. MainTask:
  18. rm -f main;
  19. $(CC) -D $(Project) -include../../../Modularization/ocppfiles/sqlite3.h -include../../../Modularization/Module_Upgrade.h -include../../../Modularization/Module_RFID.h -O0 -g3 -Wall -c -fmessage-length=0 -o main.o main.c
  20. $(CC) -D $(Project) -include../../../Modularization/ocppfiles/sqlite3.h -include../../../Modularization/Module_Upgrade.h -include../../../Modularization/Module_RFID.h -O0 -g3 -Wall -c -fmessage-length=0 -o timeout.o timeout.c
  21. $(CC) -o main main.o timeout.o Common.o ${Lib_Module_RFID} ${Lib_Module_Upgrade} ${Lib_SQLite3} -lrt
  22. cp -f main ../Images/root
  23. CabinetParallel:
  24. rm -f Module_CabinetParallel;
  25. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_CabinetParallel.o Module_CabinetParallel.c
  26. $(CC) -o Module_CabinetParallel Module_CabinetParallel.o Common.o -lrt
  27. cp -f Module_CabinetParallel ../Images/root
  28. SelfTestTask:
  29. rm -f Module_ChargerSelfTest;
  30. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_ChargerSelfTest.o Module_ChargerSelfTest.c
  31. $(CC) -o Module_ChargerSelfTest Module_ChargerSelfTest.o Common.o -lrt
  32. cp -f Module_ChargerSelfTest ../Images/root
  33. AuthorizeTask:
  34. rm -f Module_Authorize;
  35. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_Authorize.o Module_Authorize.c
  36. $(CC) -o Module_Authorize Module_Authorize.o Common.o -lrt
  37. cp -f Module_Authorize ../Images/root
  38. LedIndication:
  39. rm -f Module_LedIndication;
  40. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_LedIndication.o Module_LedIndication.c
  41. $(CC) -o Module_LedIndication Module_LedIndication.o Common.o -lrt
  42. cp -f Module_LedIndication ../Images/root
  43. EvCommTask:
  44. rm -f Module_EvComm;
  45. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Ev_Comm.o Ev_Comm.c
  46. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_EvComm.o Module_EvComm.c
  47. $(CC) -o Module_EvComm Ev_Comm.o Module_EvComm.o Common.o -lrt
  48. cp -f Module_EvComm ../Images/root
  49. EventLoggingTask:
  50. rm -f Module_EventLogging;
  51. $(CC) -D $(Project) -include../../../Modularization/ocppfiles/sqlite3.h -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_EventLogging.o Module_EventLogging.c
  52. $(CC) -o Module_EventLogging Module_EventLogging.o Common.o ${Lib_SQLite3} -lrt
  53. cp -f Module_EventLogging ../Images/root
  54. InternalCommTask:
  55. rm -f Module_InternalComm;
  56. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o internalComm.o internalComm.c
  57. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_InternalComm.o Module_InternalComm.c
  58. $(CC) -o Module_InternalComm Module_InternalComm.o internalComm.o Common.o -lrt
  59. cp -f Module_InternalComm ../Images/root
  60. LcmControlTask:
  61. rm -f Module_LcmControl;
  62. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_LcmControl.o Module_LcmControl.c
  63. $(CC) -o Module_LcmControl Module_LcmControl.o -lrt
  64. cp -f Module_LcmControl ../Images/root
  65. PrimaryCommTask:
  66. rm -f Module_PrimaryComm;
  67. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_PrimaryComm.o Module_PrimaryComm.c
  68. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o PrimaryComm.o PrimaryComm.c
  69. $(CC) -o Module_PrimaryComm Module_PrimaryComm.o PrimaryComm.o Common.o -lrt
  70. cp -f Module_PrimaryComm ../Images/root
  71. InfyGroup_PsuCommObj:
  72. rm -f libInfyGroup_PsuCommObj.a
  73. $(CC) -D $(Project) -O0 -g3 -Wall -c -fmessage-length=0 -o InfyGroup_PsuCommObj.o InfyGroup_PsuCommObj.c
  74. $(AR) -r libInfyGroup_PsuCommObj.a InfyGroup_PsuCommObj.o
  75. rm -f InfyGroup_PsuCommObj.o
  76. PhGroup_PsuCommObj:
  77. rm -f libPhGroup_PsuCommObj.a
  78. $(CC) -D $(Project) -O0 -g3 -Wall -c -fmessage-length=0 -o PhGroup_PsuCommObj.o PhGroup_PsuCommObj.c
  79. $(AR) -r libPhGroup_PsuCommObj.a PhGroup_PsuCommObj.o
  80. rm -f PhGroup_PsuCommObj.o
  81. PsuCommTask:
  82. rm -f Module_PsuComm;
  83. $(CC) -D $(Project) -includeInfyGroup_PsuCommObj.h -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_PsuComm.o Module_PsuComm.c
  84. $(CC) -o Module_PsuComm Module_PsuComm.o libInfyGroup_PsuCommObj.a Common.o -lrt
  85. cp -f Module_PsuComm ../Images/root
  86. PhPsuCommTask:
  87. rm -f Module_PsuComm_PH;
  88. $(CC) -D $(Project) -includePhGroup_PsuCommObj.h -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_PsuComm_PH.o Module_PsuComm.c
  89. $(CC) -o Module_PsuComm_PH Module_PsuComm_PH.o libPhGroup_PsuCommObj.a Common.o -lrt
  90. cp -f Module_PsuComm_PH ../Images/root
  91. ReadCmdlineTask:
  92. rm -f ReadCmdline;
  93. $(CC) -D $(Project) -includeConfig.h -include../../../Modularization/Module_RatedCurrent.h -O0 -g3 -Wall -c -fmessage-length=0 -o ReadCmdline.o ReadCmdline.c
  94. $(CC) -o ReadCmdline ReadCmdline.o Common.o ../../../Modularization/libModule_RatedCurrent.a -lrt -lm
  95. cp -f ReadCmdline ../Images/root
  96. DispenserDiagnostics:
  97. rm -f Module_Diagnostics;
  98. $(CC) -D $(Project) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_Diagnostics.o Module_Diagnostics.c
  99. $(CC) -o Module_Diagnostics Module_Diagnostics.o Common.o -lrt -lm
  100. cp -f Module_Diagnostics ../Images/root
  101. UnsafetyOutputTool:
  102. rm -f UnsafetyOutputTask;
  103. $(CC) -D $(Project) -include../../../Modularization/Infypwr_PsuCommObj.h -O0 -g3 -Wall -c -fmessage-length=0 -o OutputTask.o OutputTask.c
  104. $(CC) -o UnsafetyOutputTask OutputTask.o ../../../Modularization/libInfypwr_PsuCommObj.a
  105. cp -f UnsafetyOutputTask ../Images/root
  106. FactoryConfigApp:
  107. @echo "===== Module_FactoryConfig_Task =================================="
  108. rm -f FactoryConfig
  109. gcc -D $(Project) "-I../../" -o FactoryConfig "./FactoryConfig.c"
  110. mkdir -p /Storage/SystemLog
  111. ./FactoryConfig -f;true
  112. cp /mnt/FactoryDefaultConfig.bin ../Images
  113. rm -f FactoryConfig;
  114. $(CC) -D $(Project) -O0 -g3 -Wall -c -fmessage-length=0 -o FactoryConfig.o FactoryConfig.c
  115. $(CC) -o FactoryConfig FactoryConfig.o
  116. cp -f FactoryConfig ../Images/root
  117. OtherTools:
  118. cp -f init.sh ../Images/root
  119. cp -f kill.sh ../Images/root
  120. cp -f web.sh ../Images/root
  121. CopyFile:
  122. rm -rfv ../Images/root
  123. mkdir -p ../Images/root
  124. Clean: CleanObj CleanExecute
  125. CleanObj:
  126. rm -f *.o
  127. CleanExecute:
  128. rm -f main
  129. rm -f Module_EvComm
  130. rm -f Module_CabinetParallel
  131. rm -f Module_ChargerSelfTest
  132. rm -f Module_Authorize
  133. rm -f Module_LedIndication
  134. rm -f Module_EventLogging
  135. rm -f Module_InternalComm
  136. rm -f Module_LcmControl
  137. rm -f Module_PrimaryComm
  138. rm -f Module_PsuComm
  139. rm -f Module_PsuComm_PH
  140. rm -f ReadCmdline
  141. rm -f Module_Diagnostics
  142. rm -f FactoryConfig
  143. rm -f UnsafetyOutputTask