diff --git a/Makefile b/Makefile index 203d0fb..9fc1fcc 100644 --- a/Makefile +++ b/Makefile @@ -101,9 +101,9 @@ ${OBJECTS}: config.mk ${PROJECT}/version.h \ ${BUILDDIR_RELEASE}/%.o: %.c $(call colorecho,CC,$<) - @mkdir -p ${DEPENDDIR}/$(dir $(abspath $@)) + @mkdir -p ${DEPENDDIR}/$(dir $@) @mkdir -p $(dir $(abspath $@)) - $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep + $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF ${DEPENDDIR}/$@.dep ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}: ${OBJECTS} $(call colorecho,CC,$@) @@ -125,10 +125,10 @@ ${OBJECTS_DEBUG}: config.mk ${PROJECT}/version.h \ ${BUILDDIR_DEBUG}/%.o: %.c $(call colorecho,CC,$<) - @mkdir -p ${DEPENDDIR}/$(dir $(abspath $@)) + @mkdir -p ${DEPENDDIR}/$(dir $@) @mkdir -p $(dir $(abspath $@)) $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} \ - -o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep + -o $@ $< -MMD -MF ${DEPENDDIR}/$@.dep ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}: ${OBJECTS_DEBUG} $(call colorecho,CC,$@) @@ -148,10 +148,10 @@ ${OBJECTS_GCOV}: config.mk ${PROJECT}/version.h \ ${BUILDDIR_GCOV}/%.o: %.c $(call colorecho,CC,$<) - @mkdir -p ${DEPENDDIR}/$(dir $(abspath $@)) + @mkdir -p ${DEPENDDIR}/$(dir $@) @mkdir -p $(dir $(abspath $@)) $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} \ - -o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep + -o $@ $< -MMD -MF ${DEPENDDIR}/$@.dep ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}: ${OBJECTS_GCOV} $(call colorecho,CC,$@) @@ -288,7 +288,8 @@ uninstall: uninstall-headers $(QUIET)rm -f $(DESTDIR)$(APPDATAPREFIX)/$(PROJECT).appdata.xml $(MAKE) -C po uninstall --include $(wildcard ${DEPENDDIR}/*.dep) +DEPENDS = ${DEPENDDIRS:^=${DEPENDDIR}/}$(addprefix ${DEPENDDIR}/,${OBJECTS:.o=.o.dep}) +-include ${DEPENDS} .PHONY: all options clean doc debug valgrind gdb dist doc install uninstall \ test po install-headers uninstall-headers update-po install-manpages \