aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil/nil.mk
blob: f3d14419923d2b4a2ef0c8b9c126716d6a6eae13 (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
# List of all the ChibiOS/NIL kernel files, there is no need to remove the files
# from this list, you can disable parts of the kernel by editing chconf.h.
ifeq ($(USE_SMART_BUILD),yes)
CHCONF := $(strip $(shell cat chconf.h | egrep -e "\#define"))
KERNSRC := ${CHIBIOS}/os/nil/src/ch.c
ifneq ($(findstring CH_CFG_USE_MAILBOXES TRUE,$(CHCONF)),)
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chmboxes.c
endif
ifneq ($(findstring CH_CFG_USE_MEMCORE TRUE,$(CHCONF)),)
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chmemcore.c
endif
ifneq ($(findstring CH_CFG_USE_HEAP TRUE,$(CHCONF)),)
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chheap.c
endif
ifneq ($(findstring CH_CFG_USE_MEMPOOLS TRUE,$(CHCONF)),)
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chmempools.c
endif
ifneq ($(findstring CH_CFG_USE_FACTORY TRUE,$(CHCONF)),)
KERNSRC += $(CHIBIOS)/os/common/oslib/src/chfactory.c
endif
else
KERNSRC := ${CHIBIOS}/os/nil/src/ch.c \
           $(CHIBIOS)/os/common/oslib/src/chmboxes.c \
           $(CHIBIOS)/os/common/oslib/src/chmemcore.c \
           $(CHIBIOS)/os/common/oslib/src/chheap.c \
           $(CHIBIOS)/os/common/oslib/src/chmempools.c \
           $(CHIBIOS)/os/common/oslib/src/chfactory.c
endif

# Required include directories
KERNINC := ${CHIBIOS}/os/nil/include \
           ${CHIBIOS}/os/common/oslib/include

# Shared variables
ALLCSRC += $(KERNSRC)
ALLINC  += $(KERNINC)