diff --git a/Makefile b/Makefile index 2e2616c..9b4459b 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ ${PROJECT}: ${OBJECTS} clean: @rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \ - ${DOBJECTS} ${PROJECT}-debug .depend + ${DOBJECTS} ${PROJECT}-debug .depend ${PROJECT}.pc ${PROJECT}-debug: ${DOBJECTS} @echo CC -o ${PROJECT}-debug @@ -43,6 +43,12 @@ ${PROJECT}-debug: ${DOBJECTS} debug: ${PROJECT}-debug +${PROJECT}.pc: ${PROJECT}.pc.in config.mk + @echo project=${PROJECT} > ${PROJECT}.pc + @echo version=${VERSION} >> ${PROJECT}.pc + @echo includedir=${PREFIX}/include/${PROJECT} >> ${PROJECT}.pc + @cat ${PROJECTNV}.pc.in >> ${PROJECT}.pc + valgrind: debug valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \ ./${PROJECT}-debug @@ -53,12 +59,13 @@ gdb: debug dist: clean @${MAKE} -p ${PROJECT}-${VERSION} @cp -R LICENSE Makefile config.mk README \ - ${PROJECT}.1 ${SOURCE} ${PROJECT}-${VERSION} + ${PROJECT}.1 ${SOURCE} ${PROJECT}-${VERSION} \ + ${PROJECT}.pc.in @tar -cf ${PROJECT}-${VERSION}.tar ${PROJECT}-${VERSION} @gzip ${PROJECT}-${VERSION}.tar @rm -rf ${PROJECT}-${VERSION} -install: all +install: all ${PROJECT}.pc @echo installing executable file @mkdir -p ${DESTDIR}${PREFIX}/bin @cp -f ${PROJECT} ${DESTDIR}${PREFIX}/bin @@ -71,6 +78,9 @@ install: all @mkdir -p ${DESTDIR}${MANPREFIX}/man1 @sed "s/VERSION/${VERSION}/g" < ${PROJECT}.1 > ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1 + @echo installing pkgconfig file + @mkdir -p ${DESTDIR}${PREFIX}/lib/pkgconfig + @cp -f ${PROJECT}.pc ${DESTDIR}${PREFIX}/lib/pkgconfig uninstall: @echo removing executable file @@ -80,6 +90,8 @@ uninstall: @rm -f ${DESTDIR}${PREFIX}/include/${PROJECT}/zathura.h @echo removing manual page @rm -f ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1 + @echo removing pkgconfig file + @rm -f ${DESTDIR}${PREFIX}/lib/pkgconfig -include $(wildcard .depend/*.dep) diff --git a/zathura.pc.in b/zathura.pc.in new file mode 100644 index 0000000..6e36e4f --- /dev/null +++ b/zathura.pc.in @@ -0,0 +1,9 @@ + +INC_PATH=-I${includedir} + +Name: ${project} +Description: document viewer +Version: ${version} +URL: http://pwmt.org/projects/zathura +Cflags: ${INC_PATH} +Libs: