aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/platform.mk
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/templates/platform.mk')
-rw-r--r--os/hal/templates/platform.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/os/hal/templates/platform.mk b/os/hal/templates/platform.mk
index dfa472e94..fac62e0b0 100644
--- a/os/hal/templates/platform.mk
+++ b/os/hal/templates/platform.mk
@@ -1,6 +1,12 @@
# List of all the template platform files.
ifeq ($(USE_SMART_BUILD),yes)
-HALCONF := $(strip $(shell cat halconf.h | egrep -e "\#define"))
+
+# Configuration files directory
+ifeq ($(CONFDIR),)
+ CONFDIR = .
+endif
+
+HALCONF := $(strip $(shell cat $(CONFDIR)/halconf.h | egrep -e "\#define"))
PLATFORMSRC := ${CHIBIOS}/os/hal/templates/hal_lld.c \
${CHIBIOS}/os/hal/templates/hal_st_lld.c
@@ -10,6 +16,9 @@ endif
ifneq ($(findstring HAL_USE_CAN TRUE,$(HALCONF)),)
PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_can_lld.c
endif
+ifneq ($(findstring HAL_USE_CRY TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_cry_lld.c
+endif
ifneq ($(findstring HAL_USE_DAC TRUE,$(HALCONF)),)
PLATFORMSRC += ${CHIBIOS}/os/hal/templates/hal_dac_lld.c
endif