Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. -include ../../../../Rules.make
  2. export PATH=/bin:/sbin:/usr/bin:$(SDK_PATH_TARGET)/usr/bin:$PATH
  3. #define library variable
  4. Lib_Module_RFID = -L../../../Modularization -lModule_RFID
  5. Lib_Module_Upgrade = "-L../../../Modularization" -lModule_Upgrade
  6. all: CopyFile apps
  7. apps: Module_InternalComm_Task Module_FactoryConfig_Task Module_EventLogging_Task Module_AlarmDetect_Task Module_CSU_Task
  8. Module_InternalComm_Task:
  9. @echo "===== Module_InternalComm_Task ==================================="
  10. rm -f Module_InternalComm
  11. $(CC) "-I../../" "-include../../../Modularization/Module_Upgrade.h" -O0 -g3 -Wall -c -fmessage-length=0 -o Module_InternalComm.o "./Module_InternalComm.c"
  12. $(CC) -o Module_InternalComm Module_InternalComm.o ${Lib_Module_Upgrade}
  13. rm -f *.o
  14. mv -f Module_InternalComm ../Images/root
  15. @echo \
  16. Module_FactoryConfig_Task:
  17. @echo "===== Module_FactoryConfig_Task =================================="
  18. rm -f Module_FactoryConfig
  19. gcc "-I../../" -o Module_FactoryConfig "./Module_FactoryConfig.c"
  20. mkdir -p /Storage/SystemLog
  21. ./Module_FactoryConfig -f;true
  22. cp /mnt/FactoryDefaultConfig.bin ../Images
  23. rm -f Module_FactoryConfig
  24. $(CC) "-I../../" -O0 -g3 -Wall -c -fmessage-length=0 -o Module_FactoryConfig.o "./Module_FactoryConfig.c"
  25. $(CC) -o Module_FactoryConfig Module_FactoryConfig.o
  26. rm -f *.o
  27. mv -f Module_FactoryConfig ../Images/root
  28. @echo \
  29. Module_EventLogging_Task:
  30. @echo "===== Module_EventLogging_Task ==================================="
  31. rm -f Module_EventLogging
  32. $(CC) "-I../../" -O0 -g3 -Wall -c -fmessage-length=0 -o Module_EventLogging.o "./Module_EventLogging.c"
  33. $(CC) -o Module_EventLogging Module_EventLogging.o
  34. rm -f *.o
  35. mv -f Module_EventLogging ../Images/root
  36. @echo \
  37. Module_AlarmDetect_Task:
  38. @echo "===== Module_AlarmDetect_Task ===================================="
  39. rm -f Module_AlarmDetect
  40. $(CC) "-I../../" -O0 -g3 -Wall -c -fmessage-length=0 -o Module_AlarmDetect.o "./Module_AlarmDetect.c"
  41. $(CC) -o Module_AlarmDetect Module_AlarmDetect.o
  42. rm -f *.o
  43. mv -f Module_AlarmDetect ../Images/root
  44. @echo \
  45. Module_CSU_Task:
  46. @echo "===== Module_CSU_Task ============================================"
  47. rm -f main
  48. $(CC) "-I../../" "-include../../../Modularization/Module_Upgrade.h" "-include../../../Modularization/Module_RFID.h" -O0 -g3 -Wall -c -fmessage-length=0 -o main.o "./main.c"
  49. $(CC) -o main main.o ${Lib_Module_RFID} ${Lib_Module_Upgrade}
  50. rm -f *.o
  51. mv -f main ../Images/root
  52. @echo \
  53. CopyFile:
  54. rm -rfv ../Images/root
  55. mkdir -p ../Images/root