aboutsummaryrefslogtreecommitdiffstats
path: root/os/lib/lib.mk
blob: f515b031578a3c85d368c2dfd009957bce6b4c3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# List of all the ChibiOS/LIB files, there is no need to remove the files
# from this list, you can disable parts of the kernel by editing chlibconf.h.
ifeq ($(USE_SMART_BUILD),yes)

# Configuration files directory
ifeq ($(CONFDIR),)
  CONFDIR = .
endif

CHLIBCONF := $(strip $(shell cat $(CONFDIR)/chconf.h | egrep -e "\#define"))

LIBSRC :=
ifneq ($(findstring CH_CFG_USE_MAILBOXES TRUE,$(CHLIBCONF)),)
LIBSRC += $(CHIBIOS)/os/lib/src/chmboxes.c
endif
ifneq ($(findstring CH_CFG_USE_MEMCORE TRUE,$(CHLIBCONF)),)
LIBSRC += $(CHIBIOS)/os/lib/src/chmemcore.c
endif
ifneq ($(findstring CH_CFG_USE_HEAP TRUE,$(CHLIBCONF)),)
LIBSRC += $(CHIBIOS)/os/lib/src/chheap.c
endif
ifneq ($(findstring CH_CFG_USE_MEMPOOLS TRUE,$(CHLIBCONF)),)
LIBSRC += $(CHIBIOS)/os/lib/src/chmempools.c
endif
ifneq ($(findstring CH_CFG_USE_FACTORY TRUE,$(CHLIBCONF)),)
LIBSRC += $(CHIBIOS)/os/lib/src/chfactory.c
endif
else
LIBSRC := $(CHIBIOS)/os/lib/src/chmboxes.c \
          $(CHIBIOS)/os/lib/src/chmemcore.c \
          $(CHIBIOS)/os/lib/src/chheap.c \
          $(CHIBIOS)/os/lib/src/chmempools.c \
          $(CHIBIOS)/os/lib/src/chfactory.c
endif

# Required include directories
LIBINC := $(CHIBIOS)/os/lib/include

# Shared variables
ALLCSRC += $(LIBSRC)
ALLINC  += $(LIBINC)