oslib.mk 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # List of all the ChibiOS/LIB files, there is no need to remove the files
  2. # from this list, you can disable parts of the kernel by editing chlibconf.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. CHLIBCONF := $(strip $(shell cat $(CHCONFDIR)/chconf.h | egrep -e "\#define"))
  13. LIBSRC :=
  14. ifneq ($(findstring CH_CFG_USE_MAILBOXES TRUE,$(CHLIBCONF)),)
  15. LIBSRC += $(CHIBIOS)/os/oslib/src/chmboxes.c
  16. endif
  17. ifneq ($(findstring CH_CFG_USE_MEMCORE TRUE,$(CHLIBCONF)),)
  18. LIBSRC += $(CHIBIOS)/os/oslib/src/chmemcore.c
  19. endif
  20. ifneq ($(findstring CH_CFG_USE_HEAP TRUE,$(CHLIBCONF)),)
  21. LIBSRC += $(CHIBIOS)/os/oslib/src/chmemheaps.c
  22. endif
  23. ifneq ($(findstring CH_CFG_USE_MEMPOOLS TRUE,$(CHLIBCONF)),)
  24. LIBSRC += $(CHIBIOS)/os/oslib/src/chmempools.c
  25. endif
  26. ifneq ($(findstring CH_CFG_USE_PIPES TRUE,$(CHLIBCONF)),)
  27. LIBSRC += $(CHIBIOS)/os/oslib/src/chpipes.c
  28. endif
  29. ifneq ($(findstring CH_CFG_USE_FACTORY TRUE,$(CHLIBCONF)),)
  30. LIBSRC += $(CHIBIOS)/os/oslib/src/chfactory.c
  31. endif
  32. else
  33. LIBSRC := $(CHIBIOS)/os/oslib/src/chmboxes.c \
  34. $(CHIBIOS)/os/oslib/src/chmemcore.c \
  35. $(CHIBIOS)/os/oslib/src/chmemheaps.c \
  36. $(CHIBIOS)/os/oslib/src/chmempools.c \
  37. $(CHIBIOS)/os/oslib/src/chpipes.c \
  38. $(CHIBIOS)/os/oslib/src/chfactory.c
  39. endif
  40. # Required include directories
  41. LIBINC := $(CHIBIOS)/os/oslib/include
  42. # Shared variables
  43. ALLCSRC += $(LIBSRC)
  44. ALLINC += $(LIBINC)