rt.mk 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # List of all the ChibiOS/RT kernel files, there is no need to remove the files
  2. # from this list, you can disable parts of the kernel by editing chconf.h.
  3. ifeq ($(USE_SMART_BUILD),yes)
  4. # Configuration files directory
  5. ifeq ($(CHCONFDIR),)
  6. ifeq ($(CONFDIR),)
  7. CHCONFDIR = .
  8. else
  9. CHCONFDIR := $(CONFDIR)
  10. endif
  11. endif
  12. CHCONF := $(strip $(shell cat $(CHCONFDIR)/chconf.h | egrep -e "\#define"))
  13. KERNSRC := $(CHIBIOS)/os/rt/src/chsys.c \
  14. $(CHIBIOS)/os/rt/src/chdebug.c \
  15. $(CHIBIOS)/os/rt/src/chtrace.c \
  16. $(CHIBIOS)/os/rt/src/chvt.c \
  17. $(CHIBIOS)/os/rt/src/chschd.c \
  18. $(CHIBIOS)/os/rt/src/chthreads.c
  19. ifneq ($(findstring CH_CFG_USE_TM TRUE,$(CHCONF)),)
  20. KERNSRC += $(CHIBIOS)/os/rt/src/chtm.c
  21. endif
  22. ifneq ($(findstring CH_DBG_STATISTICS TRUE,$(CHCONF)),)
  23. KERNSRC += $(CHIBIOS)/os/rt/src/chstats.c
  24. endif
  25. ifneq ($(findstring CH_CFG_USE_REGISTRY TRUE,$(CHCONF)),)
  26. KERNSRC += $(CHIBIOS)/os/rt/src/chregistry.c
  27. endif
  28. ifneq ($(findstring CH_CFG_USE_SEMAPHORES TRUE,$(CHCONF)),)
  29. KERNSRC += $(CHIBIOS)/os/rt/src/chsem.c
  30. endif
  31. ifneq ($(findstring CH_CFG_USE_MUTEXES TRUE,$(CHCONF)),)
  32. KERNSRC += $(CHIBIOS)/os/rt/src/chmtx.c
  33. endif
  34. ifneq ($(findstring CH_CFG_USE_CONDVARS TRUE,$(CHCONF)),)
  35. KERNSRC += $(CHIBIOS)/os/rt/src/chcond.c
  36. endif
  37. ifneq ($(findstring CH_CFG_USE_EVENTS TRUE,$(CHCONF)),)
  38. KERNSRC += $(CHIBIOS)/os/rt/src/chevents.c
  39. endif
  40. ifneq ($(findstring CH_CFG_USE_MESSAGES TRUE,$(CHCONF)),)
  41. KERNSRC += $(CHIBIOS)/os/rt/src/chmsg.c
  42. endif
  43. ifneq ($(findstring CH_CFG_USE_DYNAMIC TRUE,$(CHCONF)),)
  44. KERNSRC += $(CHIBIOS)/os/rt/src/chdynamic.c
  45. endif
  46. else
  47. KERNSRC := $(CHIBIOS)/os/rt/src/chsys.c \
  48. $(CHIBIOS)/os/rt/src/chdebug.c \
  49. $(CHIBIOS)/os/rt/src/chtrace.c \
  50. $(CHIBIOS)/os/rt/src/chvt.c \
  51. $(CHIBIOS)/os/rt/src/chschd.c \
  52. $(CHIBIOS)/os/rt/src/chthreads.c \
  53. $(CHIBIOS)/os/rt/src/chtm.c \
  54. $(CHIBIOS)/os/rt/src/chstats.c \
  55. $(CHIBIOS)/os/rt/src/chregistry.c \
  56. $(CHIBIOS)/os/rt/src/chsem.c \
  57. $(CHIBIOS)/os/rt/src/chmtx.c \
  58. $(CHIBIOS)/os/rt/src/chcond.c \
  59. $(CHIBIOS)/os/rt/src/chevents.c \
  60. $(CHIBIOS)/os/rt/src/chmsg.c \
  61. $(CHIBIOS)/os/rt/src/chdynamic.c
  62. endif
  63. # Required include directories
  64. KERNINC := $(CHIBIOS)/os/rt/include
  65. # Shared variables
  66. ALLCSRC += $(KERNSRC)
  67. ALLINC += $(KERNINC)
  68. # OS Library
  69. include $(CHIBIOS)/os/oslib/oslib.mk