aboutsummaryrefslogtreecommitdiffstats
path: root/os/oslib/oslib.mk
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2019-01-20 15:20:43 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2019-01-20 15:20:43 +0000
commit5397ae347acc6d302b68bbdc10ec2d9e70892513 (patch)
tree8fbe8d3330f7abdc4395a4ca662abacf1be263b0 /os/oslib/oslib.mk
parentb7f28ff2e5ceab65f726e64d7fbc082eec624765 (diff)
downloadChibiOS-5397ae347acc6d302b68bbdc10ec2d9e70892513.tar.gz
ChibiOS-5397ae347acc6d302b68bbdc10ec2d9e70892513.tar.bz2
ChibiOS-5397ae347acc6d302b68bbdc10ec2d9e70892513.zip
Renames for consistency.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12564 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/oslib/oslib.mk')
-rw-r--r--os/oslib/oslib.mk49
1 files changed, 49 insertions, 0 deletions
diff --git a/os/oslib/oslib.mk b/os/oslib/oslib.mk
new file mode 100644
index 000000000..6f837c0b2
--- /dev/null
+++ b/os/oslib/oslib.mk
@@ -0,0 +1,49 @@
+# 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 ($(CHCONFDIR),)
+ ifeq ($(CONFDIR),)
+ CHCONFDIR = .
+ else
+ CHCONFDIR := $(CONFDIR)
+ endif
+endif
+
+CHLIBCONF := $(strip $(shell cat $(CHCONFDIR)/chconf.h | egrep -e "\#define"))
+
+LIBSRC :=
+ifneq ($(findstring CH_CFG_USE_MAILBOXES TRUE,$(CHLIBCONF)),)
+LIBSRC += $(CHIBIOS)/os/oslib/src/chmboxes.c
+endif
+ifneq ($(findstring CH_CFG_USE_MEMCORE TRUE,$(CHLIBCONF)),)
+LIBSRC += $(CHIBIOS)/os/oslib/src/chmemcore.c
+endif
+ifneq ($(findstring CH_CFG_USE_HEAP TRUE,$(CHLIBCONF)),)
+LIBSRC += $(CHIBIOS)/os/oslib/src/chmemheaps.c
+endif
+ifneq ($(findstring CH_CFG_USE_MEMPOOLS TRUE,$(CHLIBCONF)),)
+LIBSRC += $(CHIBIOS)/os/oslib/src/chmempools.c
+endif
+ifneq ($(findstring CH_CFG_USE_PIPES TRUE,$(CHLIBCONF)),)
+LIBSRC += $(CHIBIOS)/os/oslib/src/chpipes.c
+endif
+ifneq ($(findstring CH_CFG_USE_FACTORY TRUE,$(CHLIBCONF)),)
+LIBSRC += $(CHIBIOS)/os/oslib/src/chfactory.c
+endif
+else
+LIBSRC := $(CHIBIOS)/os/oslib/src/chmboxes.c \
+ $(CHIBIOS)/os/oslib/src/chmemcore.c \
+ $(CHIBIOS)/os/oslib/src/chmemheaps.c \
+ $(CHIBIOS)/os/oslib/src/chmempools.c \
+ $(CHIBIOS)/os/oslib/src/chpipes.c \
+ $(CHIBIOS)/os/oslib/src/chfactory.c
+endif
+
+# Required include directories
+LIBINC := $(CHIBIOS)/os/oslib/include
+
+# Shared variables
+ALLCSRC += $(LIBSRC)
+ALLINC += $(LIBINC)