diff options
Diffstat (limited to 'os/common/startup/ARMCAx-TZ/compilers/GCC')
-rw-r--r-- | os/common/startup/ARMCAx-TZ/compilers/GCC/rules.mk | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/os/common/startup/ARMCAx-TZ/compilers/GCC/rules.mk b/os/common/startup/ARMCAx-TZ/compilers/GCC/rules.mk index 06bed68ed..4c0c3af57 100644 --- a/os/common/startup/ARMCAx-TZ/compilers/GCC/rules.mk +++ b/os/common/startup/ARMCAx-TZ/compilers/GCC/rules.mk @@ -190,7 +190,7 @@ PRE_MAKE_ALL_RULE_HOOK: POST_MAKE_ALL_RULE_HOOK:
-$(OBJS): | $(BUILDDIR) $(OBJDIR) $(LSTDIR)
+$(OBJS): | $(BUILDDIR) $(OBJDIR) $(LSTDIR) $(DEPDIR)
$(BUILDDIR):
ifneq ($(USE_VERBOSE_COMPILE),yes)
@@ -206,6 +206,9 @@ $(OBJDIR): $(LSTDIR):
@mkdir -p $(LSTDIR)
+$(DEPDIR):
+ @mkdir -p $(DEPDIR)
+
$(ACPPOBJS) : $(OBJDIR)/%.o : %.cpp $(MAKEFILE_LIST)
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
@@ -315,8 +318,11 @@ $(BUILDDIR)/lib$(PROJECT).a: $(OBJS) clean: CLEAN_RULE_HOOK
@echo Cleaning
- -rm -fR $(DEPDIR)/* $(BUILDDIR)/* 2>/dev/null
- -rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(DEPDIR)) $(subst ./,,$(BUILDDIR)) 2>/dev/null
+ @echo - $(DEPDIR)
+ @-rm -fR $(DEPDIR)/* $(BUILDDIR)/* 2>/dev/null
+ @-if [ -d "$(DEPDIR)" ]; then rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(DEPDIR)) 2>/dev/null; fi
+ @echo - $(BUILDDIR)
+ @-if [ -d "$(BUILDDIR)" ]; then rmdir -p --ignore-fail-on-non-empty $(subst ./,,$(BUILDDIR)) 2>/dev/null; fi
@echo
@echo Done
@@ -325,6 +331,6 @@ CLEAN_RULE_HOOK: #
# Include the dependency files, should be the last of the makefile
#
--include $(shell mkdir -p $(DEPDIR) 2>/dev/null)
+-include $(wildcard $(DEPDIR)/*)
# *** EOF ***
|