From 8025225e149720dc1efce41cfa2bc5694de965f9 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Tue, 19 Apr 2011 18:53:41 +0200 Subject: [PATCH] create dependencies --- Makefile | 10 +++++++--- ft/djvu/Makefile | 10 +++++++--- ft/pdf-mupdf/Makefile | 10 +++++++--- ft/pdf-poppler/Makefile | 10 +++++++--- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 27daaaa..9bb1219 100644 --- a/Makefile +++ b/Makefile @@ -19,11 +19,13 @@ options: %.o: %.c @echo CC $< - @${CC} -c ${CFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep %.do: %.c @echo CC $< - @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep ${OBJECTS}: config.mk ${DOBJECTS}: config.mk @@ -34,7 +36,7 @@ ${PROJECT}: ${OBJECTS} clean: @rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \ - ${DOBJECTS} ${PROJECT}-debug + ${DOBJECTS} ${PROJECT}-debug .depend make -C ft clean ${PROJECT}-debug: ${DOBJECTS} @@ -76,3 +78,5 @@ uninstall: @echo removing manual page @rm -f ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1 @make -C ft uninstall + +-include $(wildcard .depend/*.dep) diff --git a/ft/djvu/Makefile b/ft/djvu/Makefile index d5e7617..bf406b2 100644 --- a/ft/djvu/Makefile +++ b/ft/djvu/Makefile @@ -18,11 +18,13 @@ options: %.o: %.c @echo CC $< - @${CC} -c ${CFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep %.do: %.c @echo CC $< - @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep ${OBJECTS}: config.mk ${DOBJECTS}: config.mk @@ -36,7 +38,7 @@ ${PLUGIN}-debug: ${DOBJECTS} @${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS} clean: - @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so + @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so .depend debug: options ${PLUGIN}-debug @@ -49,3 +51,5 @@ uninstall: @echo uninstalling ${PLUGIN} plugin @rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so @rm -rf ${DESTDIR}${PREFIX}/lib/zathura + +-include $(wildcard .depend/*.dep) diff --git a/ft/pdf-mupdf/Makefile b/ft/pdf-mupdf/Makefile index e14ed8c..e191eb9 100644 --- a/ft/pdf-mupdf/Makefile +++ b/ft/pdf-mupdf/Makefile @@ -18,11 +18,13 @@ options: %.o: %.c @echo CC $< - @${CC} -c ${CFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep %.do: %.c @echo CC $< - @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep ${OBJECTS}: config.mk ${DOBJECTS}: config.mk @@ -36,7 +38,7 @@ ${PLUGIN}-debug: ${DOBJECTS} @${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS} clean: - @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so + @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so .depend debug: options ${PLUGIN}-debug @@ -49,3 +51,5 @@ uninstall: @echo uninstalling ${PLUGIN} plugin @rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so @rm -rf ${DESTDIR}${PREFIX}/lib/zathura + +-include $(wildcard .depend/*.dep) diff --git a/ft/pdf-poppler/Makefile b/ft/pdf-poppler/Makefile index e14ed8c..e191eb9 100644 --- a/ft/pdf-poppler/Makefile +++ b/ft/pdf-poppler/Makefile @@ -18,11 +18,13 @@ options: %.o: %.c @echo CC $< - @${CC} -c ${CFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep %.do: %.c @echo CC $< - @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< + @mkdir -p .depend + @${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep ${OBJECTS}: config.mk ${DOBJECTS}: config.mk @@ -36,7 +38,7 @@ ${PLUGIN}-debug: ${DOBJECTS} @${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS} clean: - @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so + @rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so .depend debug: options ${PLUGIN}-debug @@ -49,3 +51,5 @@ uninstall: @echo uninstalling ${PLUGIN} plugin @rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so @rm -rf ${DESTDIR}${PREFIX}/lib/zathura + +-include $(wildcard .depend/*.dep)