aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/common/startup/ARM/compilers/GCC/rules.mk22
-rw-r--r--os/common/startup/ARMCMx/compilers/GCC/rules.mk21
-rw-r--r--os/common/startup/SIMIA32/compilers/GCC/rules.mk22
-rw-r--r--os/common/startup/e200/compilers/GCC/rules.mk24
-rw-r--r--os/hal/hal.mk8
-rw-r--r--os/hal/ports/STM32/STM32F0xx/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32F1xx/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk8
-rw-r--r--os/hal/ports/STM32/STM32F37x/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32F3xx/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32F4xx/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32F7xx/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32L0xx/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32L1xx/platform.mk8
-rw-r--r--os/hal/ports/STM32/STM32L4xx/platform.mk8
-rw-r--r--os/rt/rt.mk8
16 files changed, 145 insertions, 40 deletions
diff --git a/os/common/startup/ARM/compilers/GCC/rules.mk b/os/common/startup/ARM/compilers/GCC/rules.mk
index f66daa520..0860b2974 100644
--- a/os/common/startup/ARM/compilers/GCC/rules.mk
+++ b/os/common/startup/ARM/compilers/GCC/rules.mk
@@ -76,10 +76,18 @@ endif
ifeq ($(BUILDDIR),.)
BUILDDIR = build
endif
+
+# Dependencies directory
+ifeq ($(DEPDIR),)
+ DEPDIR = .dep
+endif
+ifeq ($(DEPDIR),.)
+ DEPDIR = .dep
+endif
+
OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).hex \
$(BUILDDIR)/$(PROJECT).bin $(BUILDDIR)/$(PROJECT).dmp \
$(BUILDDIR)/$(PROJECT).list
-
# Source files groups and paths
ifeq ($(USE_THUMB),yes)
@@ -157,10 +165,10 @@ else
endif
# Generate dependency information
-ASFLAGS += -MD -MP -MF .dep/$(@F).d
-ASXFLAGS += -MD -MP -MF .dep/$(@F).d
-CFLAGS += -MD -MP -MF .dep/$(@F).d
-CPPFLAGS += -MD -MP -MF .dep/$(@F).d
+ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CPPFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
# Paths where to search for sources
VPATH = $(SRCPATHS)
@@ -300,7 +308,7 @@ $(BUILDDIR)/lib$(PROJECT).a: $(OBJS)
clean: CLEAN_RULE_HOOK
@echo Cleaning
- -rm -fR .dep $(BUILDDIR)
+ -rm -fR $(DEPDIR) $(BUILDDIR)
@echo
@echo Done
@@ -309,6 +317,6 @@ CLEAN_RULE_HOOK:
#
# Include the dependency files, should be the last of the makefile
#
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+-include $(shell mkdir $(DEPDIR) 2>/dev/null) $(wildcard $(DEPDIR)/*)
# *** EOF ***
diff --git a/os/common/startup/ARMCMx/compilers/GCC/rules.mk b/os/common/startup/ARMCMx/compilers/GCC/rules.mk
index 3c0857042..1ca7298a7 100644
--- a/os/common/startup/ARMCMx/compilers/GCC/rules.mk
+++ b/os/common/startup/ARMCMx/compilers/GCC/rules.mk
@@ -66,6 +66,15 @@ endif
ifeq ($(BUILDDIR),.)
BUILDDIR = build
endif
+
+# Dependencies directory
+ifeq ($(DEPDIR),)
+ DEPDIR = .dep
+endif
+ifeq ($(DEPDIR),.)
+ DEPDIR = .dep
+endif
+
OUTFILES := $(BUILDDIR)/$(PROJECT).elf \
$(BUILDDIR)/$(PROJECT).hex \
$(BUILDDIR)/$(PROJECT).bin \
@@ -153,10 +162,10 @@ else
endif
# Generate dependency information
-ASFLAGS += -MD -MP -MF .dep/$(@F).d
-ASXFLAGS += -MD -MP -MF .dep/$(@F).d
-CFLAGS += -MD -MP -MF .dep/$(@F).d
-CPPFLAGS += -MD -MP -MF .dep/$(@F).d
+ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CPPFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
# Paths where to search for sources
VPATH = $(SRCPATHS)
@@ -306,7 +315,7 @@ $(BUILDDIR)/lib$(PROJECT).a: $(OBJS)
clean: CLEAN_RULE_HOOK
@echo Cleaning
- -rm -fR .dep $(BUILDDIR)
+ -rm -fR $(DEPDIR) $(BUILDDIR)
@echo
@echo Done
@@ -315,6 +324,6 @@ CLEAN_RULE_HOOK:
#
# Include the dependency files, should be the last of the makefile
#
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+-include $(shell mkdir $(DEPDIR) 2>/dev/null) $(wildcard $(DEPDIR)/*)
# *** EOF ***
diff --git a/os/common/startup/SIMIA32/compilers/GCC/rules.mk b/os/common/startup/SIMIA32/compilers/GCC/rules.mk
index 54c27f0fa..5bf3b96f2 100644
--- a/os/common/startup/SIMIA32/compilers/GCC/rules.mk
+++ b/os/common/startup/SIMIA32/compilers/GCC/rules.mk
@@ -34,8 +34,16 @@ endif
ifeq ($(BUILDDIR),.)
BUILDDIR = build
endif
+
+# Dependencies directory
+ifeq ($(DEPDIR),)
+ DEPDIR = .dep
+endif
+ifeq ($(DEPDIR),.)
+ DEPDIR = .dep
+endif
+
OUTFILES = $(BUILDDIR)/$(PROJECT)
-
# Source files groups and paths
SRC = $(CSRC)$(CPPSRC)
@@ -73,10 +81,10 @@ CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir
LDFLAGS = $(MCFLAGS) $(OPT) $(LLIBDIR) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,$(LDOPT)
# Generate dependency information
-ASFLAGS += -MD -MP -MF .dep/$(@F).d
-ASXFLAGS += -MD -MP -MF .dep/$(@F).d
-CFLAGS += -MD -MP -MF .dep/$(@F).d
-CPPFLAGS += -MD -MP -MF .dep/$(@F).d
+ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CPPFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
# Paths where to search for sources
VPATH = $(SRCPATHS)
@@ -161,7 +169,7 @@ $(BUILDDIR)/lib$(PROJECT).a: $(OBJS)
clean: CLEAN_RULE_HOOK
@echo Cleaning
- -rm -fR .dep $(BUILDDIR)
+ -rm -fR $(DEPDIR) $(BUILDDIR)
@echo
@echo Done
@@ -174,6 +182,6 @@ gcov:
#
# Include the dependency files, should be the last of the makefile
#
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+-include $(shell mkdir $(DEPDIR) 2>/dev/null) $(wildcard $(DEPDIR)/*)
# *** EOF ***
diff --git a/os/common/startup/e200/compilers/GCC/rules.mk b/os/common/startup/e200/compilers/GCC/rules.mk
index c84ebc66f..4645b5110 100644
--- a/os/common/startup/e200/compilers/GCC/rules.mk
+++ b/os/common/startup/e200/compilers/GCC/rules.mk
@@ -58,10 +58,18 @@ endif
ifeq ($(BUILDDIR),.)
BUILDDIR = build
endif
+
+# Dependencies directory
+ifeq ($(DEPDIR),)
+ DEPDIR = .dep
+endif
+ifeq ($(DEPDIR),.)
+ DEPDIR = .dep
+endif
+
OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).hex \
$(BUILDDIR)/$(PROJECT).mot $(BUILDDIR)/$(PROJECT).bin \
- $(BUILDDIR)/$(PROJECT).dmp $(BUILDDIR)/$(PROJECT).list
-
+ $(BUILDDIR)/$(PROJECT).dmp $(BUILDDIR)/$(PROJECT).list
# Source files groups and paths
SRC = $(CSRC)$(CPPSRC)
@@ -99,10 +107,10 @@ CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir
LDFLAGS = $(MCFLAGS) $(OPT) -nostartfiles $(LLIBDIR) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--library-path=$(RULESPATH)/ld,$(LDOPT),--script=$(LDSCRIPT)
# Generate dependency information
-ASFLAGS += -MD -MP -MF .dep/$(@F).d
-ASXFLAGS += -MD -MP -MF .dep/$(@F).d
-CFLAGS += -MD -MP -MF .dep/$(@F).d
-CPPFLAGS += -MD -MP -MF .dep/$(@F).d
+ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+CPPFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
# Paths where to search for sources
VPATH = $(SRCPATHS)
@@ -231,7 +239,7 @@ $(BUILDDIR)/lib$(PROJECT).a: $(OBJS)
clean: CLEAN_RULE_HOOK
@echo Cleaning
- -rm -fR .dep $(BUILDDIR)
+ -rm -fR $(DEPDIR) $(BUILDDIR)
@echo
@echo Done
@@ -240,6 +248,6 @@ CLEAN_RULE_HOOK:
#
# Include the dependency files, should be the last of the makefile
#
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+-include $(shell mkdir $(DEPDIR) 2>/dev/null) $(wildcard $(DEPDIR)/*)
# *** EOF ***
diff --git a/os/hal/hal.mk b/os/hal/hal.mk
index 905dbfd5d..9691e4b23 100644
--- a/os/hal/hal.mk
+++ b/os/hal/hal.mk
@@ -1,7 +1,13 @@
# List of all the ChibiOS/HAL files, there is no need to remove the files
# from this list, you can disable parts of the HAL by editing halconf.h.
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"))
HALSRC := $(CHIBIOS)/os/hal/src/hal.c \
$(CHIBIOS)/os/hal/src/hal_st.c \
diff --git a/os/hal/ports/STM32/STM32F0xx/platform.mk b/os/hal/ports/STM32/STM32F0xx/platform.mk
index 0af154124..91b3e1bb7 100644
--- a/os/hal/ports/STM32/STM32F0xx/platform.mk
+++ b/os/hal/ports/STM32/STM32F0xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32F1xx/platform.mk b/os/hal/ports/STM32/STM32F1xx/platform.mk
index 216724585..b115aafc3 100644
--- a/os/hal/ports/STM32/STM32F1xx/platform.mk
+++ b/os/hal/ports/STM32/STM32F1xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk b/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk
index 8c4eb980e..719457e83 100644
--- a/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk
+++ b/os/hal/ports/STM32/STM32F1xx/platform_f105_f107.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32F37x/platform.mk b/os/hal/ports/STM32/STM32F37x/platform.mk
index 09e487f22..9dbccae60 100644
--- a/os/hal/ports/STM32/STM32F37x/platform.mk
+++ b/os/hal/ports/STM32/STM32F37x/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_ADC TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F37x/hal_adc_lld.c
diff --git a/os/hal/ports/STM32/STM32F3xx/platform.mk b/os/hal/ports/STM32/STM32F3xx/platform.mk
index 61094702e..0109b5a5c 100644
--- a/os/hal/ports/STM32/STM32F3xx/platform.mk
+++ b/os/hal/ports/STM32/STM32F3xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F3xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32F4xx/platform.mk b/os/hal/ports/STM32/STM32F4xx/platform.mk
index 0844fb78f..811249c6d 100644
--- a/os/hal/ports/STM32/STM32F4xx/platform.mk
+++ b/os/hal/ports/STM32/STM32F4xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32F7xx/platform.mk b/os/hal/ports/STM32/STM32F7xx/platform.mk
index 5c6d14a23..c1cffcbbf 100644
--- a/os/hal/ports/STM32/STM32F7xx/platform.mk
+++ b/os/hal/ports/STM32/STM32F7xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32F7xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32L0xx/platform.mk b/os/hal/ports/STM32/STM32L0xx/platform.mk
index 978aae073..3cbacdd85 100644
--- a/os/hal/ports/STM32/STM32L0xx/platform.mk
+++ b/os/hal/ports/STM32/STM32L0xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32L0xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32L1xx/platform.mk b/os/hal/ports/STM32/STM32L1xx/platform.mk
index e2c2344af..23c6bbaae 100644
--- a/os/hal/ports/STM32/STM32L1xx/platform.mk
+++ b/os/hal/ports/STM32/STM32L1xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32L1xx/hal_ext_lld_isr.c
diff --git a/os/hal/ports/STM32/STM32L4xx/platform.mk b/os/hal/ports/STM32/STM32L4xx/platform.mk
index 824e97eb0..32733f96b 100644
--- a/os/hal/ports/STM32/STM32L4xx/platform.mk
+++ b/os/hal/ports/STM32/STM32L4xx/platform.mk
@@ -8,7 +8,13 @@ PLATFORMINC := $(CHIBIOS)/os/hal/ports/common/ARMCMx \
# Optional 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"))
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += $(CHIBIOS)/os/hal/ports/STM32/STM32L4xx/hal_ext_lld_isr.c
diff --git a/os/rt/rt.mk b/os/rt/rt.mk
index 4aa74e141..d4c4cac29 100644
--- a/os/rt/rt.mk
+++ b/os/rt/rt.mk
@@ -1,7 +1,13 @@
# List of all the ChibiOS/RT 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"))
+
+# Configuration files directory
+ifeq ($(CONFDIR),)
+ CONFDIR = .
+endif
+
+CHCONF := $(strip $(shell cat $(CONFDIR)/chconf.h | egrep -e "\#define"))
KERNSRC := $(CHIBIOS)/os/rt/src/chsys.c \
$(CHIBIOS)/os/rt/src/chdebug.c \