aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/startup/ARM/compilers/GCC/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/startup/ARM/compilers/GCC/rules.mk')
-rw-r--r--os/common/startup/ARM/compilers/GCC/rules.mk22
1 files changed, 15 insertions, 7 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 ***