Fix makefile dependencies

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Sebastian Ramacher 2015-10-22 19:30:35 +02:00
parent 6d1e916a4f
commit 40e5019276

View File

@ -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 \