Makefile 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. all: CopyFile apps
  7. #apps: Module_CSU Module_EvComm Module_EventLogging Module_InternalComm Module_LcmControl Module_PrimaryComm Module_PsuComm
  8. # ReadCmdline kill.sh
  9. apps: MainTask EvCommTask EventLoggingTask InternalCommTask LcmControlTask PrimaryCommTask PsuCommTask ReadCmdlineTask WebService 4GTask OtherTools
  10. MainTask:
  11. rm -f *.o
  12. rm -f main;
  13. $(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o timeout.o timeout.c
  14. $(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o main.o main.c
  15. $(CC) -o main main.o timeout.o ../../../Modularization/libModule_RFID.a ../../../Modularization/libModule_Upgrade.a
  16. cp -f main ../Images/root
  17. EvCommTask:
  18. rm -f Module_EvComm;
  19. $(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Ev_Comm.o Ev_Comm.c
  20. $(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_EvComm.o Module_EvComm.c
  21. $(CC) -o Module_EvComm Ev_Comm.o Module_EvComm.o
  22. cp -f Module_EvComm ../Images/root
  23. EventLoggingTask:
  24. rm -f Module_EventLogging;
  25. $(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o Module_EventLogging.o Module_EventLogging.c
  26. $(CC) -o Module_EventLogging Module_EventLogging.o
  27. cp -f Module_EventLogging ../Images/root
  28. InternalCommTask:
  29. rm -f Module_InternalComm;
  30. $(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o internalComm.o internalComm.c
  31. $(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_InternalComm.o Module_InternalComm.c
  32. $(CC) -o Module_InternalComm Module_InternalComm.o internalComm.o
  33. cp -f Module_InternalComm ../Images/root
  34. LcmControlTask:
  35. rm -f Module_LcmControl;
  36. $(CC) -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_LcmControl.o Module_LcmControl.c
  37. $(CC) -o Module_LcmControl Module_LcmControl.o
  38. cp -f Module_LcmControl ../Images/root
  39. PrimaryCommTask:
  40. rm -f Module_PrimaryComm;
  41. $(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o Module_PrimaryComm.o Module_PrimaryComm.c
  42. $(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o PrimaryComm.o PrimaryComm.c
  43. $(CC) -o Module_PrimaryComm Module_PrimaryComm.o PrimaryComm.o
  44. cp -f Module_PrimaryComm ../Images/root
  45. PsuCommTask:
  46. rm -f Module_PsuComm;
  47. $(CC) -include../../../Modularization/Phihong_PsuCommObj.h -includeConfig.h -O0 -g3 -Wall -c -fmessage-length=0 -o Module_PsuComm.o Module_PsuComm.c
  48. $(CC) -o Module_PsuComm Module_PsuComm.o ../../../Modularization/libPhihong_PsuCommObj.a
  49. cp -f Module_PsuComm ../Images/root
  50. ReadCmdlineTask:
  51. rm -f ReadCmdline;
  52. $(CC) -O0 -g3 -Wall -c -fmessage-length=0 -o ReadCmdline.o ReadCmdline.c
  53. $(CC) -o ReadCmdline ReadCmdline.o
  54. cp -f ReadCmdline ../Images/root
  55. WebService:
  56. cp -f ../../../Modularization/WebService ../Images/root
  57. 4GTask:
  58. cp -f ../../../Modularization/Module_4g ../Images/root
  59. OtherTools:
  60. cp -f init.sh ../Images/root
  61. cp -f kill.sh ../Images/root
  62. CopyFile:
  63. rm -rfv ../Images/root
  64. mkdir -p ../Images/root