define clean_obj
$(ECHO_CMD)rm -f $(1) $(patsubst %.o,%.d,$(filter-out %.res,$(1)))
+ $(ECHO_CMD)rm -f $(1) $(addsuffix .d.*,$(basename $(1)))
endef
define clean_exe
@echo "Linking $@"
$(call checkdir,$@)
$(ECHO_CMD)$(CXX) $(CFLAGS) $(LDFLAGS) -mconsole $^ $(1) -o $@
- $(makedbg)
endef
define link_winapp
@echo "Linking $@"
$(call checkdir,$@)
$(ECHO_CMD)$(CXX) $(CFLAGS) $(LDFLAGS) -mwindows $^ $(1) -o $@
- $(makedbg)
endef
define makedbg
$(OBJDIR)/%.d: %.cpp
$(makedep)
+ifneq ($(ALL_OBJS),)
ifneq ($(MAKECMDGOALS),clean)
include $(patsubst %.o,%.d,$(filter-out %.res,$(ALL_OBJS)))
endif
+endif