aboutsummaryrefslogtreecommitdiff
path: root/makefile.after
diff options
context:
space:
mode:
Diffstat (limited to 'makefile.after')
-rw-r--r--makefile.after18
1 files changed, 13 insertions, 5 deletions
diff --git a/makefile.after b/makefile.after
index 1ee5c0d2e..2ecf39423 100644
--- a/makefile.after
+++ b/makefile.after
@@ -79,7 +79,17 @@ COMMONCFLAGS += $(DEFINES:%=-D%) $(INCLUDES:%=-I%) -Fo$(relpath $@) -Fd"$(PDB)"
#PDB= # There is no PDB file generated in a release build
endif
-.PHONY: all cleanall clean clean$(OBJDIRPREFIX)
+ifeq ($(OBJDIRPREFIX),)
+ifeq ($(DEBUG),1)
+CLEANRULEPOSTFIX=debug
+else
+CLEANRULEPOSTFIX=release
+endif
+else
+CLEANRULEPOSTFIX=$(OBJDIRPREFIX)
+endif
+
+.PHONY: all cleanall clean clean$(CLEANRULEPOSTFIX)
### Implicit rules ###
CREATEDIR=if not exist $@ mkdir $@
@@ -87,11 +97,9 @@ CREATEDIR=if not exist $@ mkdir $@
$(OBJDIR) :
$(CREATEDIR)
-ifneq ($(OBJDIRPREFIX),)
-clean: clean$(OBJDIRPREFIX)
-endif
+clean: clean$(CLEANRULEPOSTFIX)
-clean$(OBJDIRPREFIX):
+clean$(CLEANRULEPOSTFIX):
del -e $(OBJDIR)
$(OBJDIR)\%$(OBJEXT) : %.c