diff options
Diffstat (limited to 'os/common/startup/SIMIA32/compilers/GCC/rules.mk')
-rw-r--r-- | os/common/startup/SIMIA32/compilers/GCC/rules.mk | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/os/common/startup/SIMIA32/compilers/GCC/rules.mk b/os/common/startup/SIMIA32/compilers/GCC/rules.mk index 1dfea462e..06494762c 100644 --- a/os/common/startup/SIMIA32/compilers/GCC/rules.mk +++ b/os/common/startup/SIMIA32/compilers/GCC/rules.mk @@ -99,7 +99,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)
@@ -115,6 +115,9 @@ $(OBJDIR): $(LSTDIR):
@mkdir -p $(LSTDIR)
+$(DEPDIR):
+ @mkdir -p $(DEPDIR)
+
$(CPPOBJS) : $(OBJDIR)/%.o : %.cpp $(MAKEFILE_LIST)
ifeq ($(USE_VERBOSE_COMPILE),yes)
@echo
@@ -169,8 +172,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
@@ -183,6 +189,6 @@ gcov: #
# Include the dependency files, should be the last of the makefile
#
--include $(shell mkdir -p $(DEPDIR) 2>/dev/null) $(wildcard $(DEPDIR)/*)
+-include $(wildcard $(DEPDIR)/*)
# *** EOF ***
|