2009-12-26 14:30:50 +01:00
|
|
|
# See LICENSE file for license and copyright information
|
2009-08-11 23:18:50 +02:00
|
|
|
|
2009-12-26 14:30:50 +01:00
|
|
|
include config.mk
|
2014-04-24 16:23:19 +02:00
|
|
|
include colors.mk
|
2011-08-31 16:41:07 +02:00
|
|
|
include common.mk
|
2009-08-11 23:18:50 +02:00
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
OSOURCE = $(filter-out ${PROJECT}/css-definitions.c, $(filter-out ${PROJECT}/dbus-interface-definitions.c, $(wildcard ${PROJECT}/*.c)))
|
2009-12-26 14:30:50 +01:00
|
|
|
|
2012-03-04 15:56:54 +01:00
|
|
|
ifneq (${WITH_SQLITE},0)
|
2014-01-15 18:50:06 +01:00
|
|
|
INCS += $(SQLITE_INC)
|
|
|
|
LIBS += $(SQLITE_LIB)
|
|
|
|
SOURCE = $(OSOURCE)
|
2012-03-04 15:56:54 +01:00
|
|
|
CPPFLAGS += -DWITH_SQLITE
|
2012-03-08 17:50:54 +01:00
|
|
|
else
|
2014-11-27 18:01:34 +01:00
|
|
|
SOURCE = $(filter-out ${PROJECT}/database-sqlite.c,$(OSOURCE))
|
2011-10-10 23:46:50 +02:00
|
|
|
endif
|
|
|
|
|
2013-02-08 10:58:57 +01:00
|
|
|
ifneq ($(WITH_MAGIC),0)
|
2014-01-15 18:50:06 +01:00
|
|
|
INCS += $(MAGIC_INC)
|
|
|
|
LIBS += $(MAGIC_LIB)
|
2013-02-08 10:58:57 +01:00
|
|
|
CPPFLAGS += -DWITH_MAGIC
|
|
|
|
endif
|
|
|
|
|
2014-06-27 22:15:55 +02:00
|
|
|
ifneq ($(WITH_SYSTEM_SYNCTEX),0)
|
|
|
|
INCS += $(SYNCTEX_INC)
|
|
|
|
LIBS += $(SYNCTEX_LIB)
|
|
|
|
else
|
|
|
|
INCS += $(ZLIB_INC)
|
|
|
|
LIBS += $(ZLIB_LIB)
|
2014-11-07 15:57:46 +01:00
|
|
|
SOURCE += $(wildcard ${PROJECT}/synctex/*.c)
|
2014-06-27 22:15:55 +02:00
|
|
|
|
|
|
|
ifeq (,$(findstring -Isynctex,${CPPFLAGS}))
|
2014-11-07 15:57:46 +01:00
|
|
|
CPPFLAGS += -I${PROJECT}/synctex
|
2014-06-27 22:15:55 +02:00
|
|
|
endif
|
|
|
|
ifeq (,$(findstring -DSYNCTEX_VERBOSE=0,${CPPFLAGS}))
|
|
|
|
CPPFLAGS += -DSYNCTEX_VERBOSE=0
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2012-03-07 16:15:06 +01:00
|
|
|
ifneq ($(wildcard ${VALGRIND_SUPPRESSION_FILE}),)
|
|
|
|
VALGRIND_ARGUMENTS += --suppressions=${VALGRIND_SUPPRESSION_FILE}
|
|
|
|
endif
|
|
|
|
|
2012-04-27 22:26:49 +02:00
|
|
|
ifeq (,$(findstring -DZATHURA_PLUGINDIR,${CPPFLAGS}))
|
|
|
|
CPPFLAGS += -DZATHURA_PLUGINDIR=\"${PLUGINDIR}\"
|
|
|
|
endif
|
|
|
|
ifeq (,$(findstring -DGETTEXT_PACKAGE,${CPPFLAGS}))
|
|
|
|
CPPFLAGS += -DGETTEXT_PACKAGE=\"${PROJECT}\"
|
|
|
|
endif
|
|
|
|
ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS}))
|
|
|
|
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
|
|
|
|
endif
|
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${SOURCE:.c=.o}) \
|
|
|
|
${BUILDDIR_RELEASE}/${PROJECT}/css-definitions.o \
|
|
|
|
${BUILDDIR_RELEASE}/${PROJECT}/dbus-interface-definitions.o
|
|
|
|
OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${SOURCE:.c=.o}) \
|
|
|
|
${BUILDDIR_DEBUG}/${PROJECT}/css-definitions.o \
|
|
|
|
${BUILDDIR_DEBUG}/${PROJECT}/dbus-interface-definitions.o
|
|
|
|
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${SOURCE:.c=.o}) \
|
|
|
|
${BUILDDIR_GCOV}/${PROJECT}/css-definitions.o \
|
|
|
|
${BUILDDIR_GCOV}/${PROJECT}/dbus-interface-definitions.o
|
|
|
|
HEADER = $(wildcard ${PROJECT}/*.h) $(wildcard synctex/*.h)
|
2014-11-07 18:08:59 +01:00
|
|
|
HEADERINST = $(addprefix ${PROJECT}/,version.h document.h macros.h page.h types.h plugin-api.h links.h)
|
2012-03-01 03:04:09 +01:00
|
|
|
|
2014-04-27 14:24:55 +02:00
|
|
|
all: options ${PROJECT} po build-manpages
|
2009-12-26 14:30:50 +01:00
|
|
|
|
2013-10-26 19:02:55 +02:00
|
|
|
# pkg-config based version checks
|
2014-01-01 16:50:19 +01:00
|
|
|
.version-checks/%: config.mk
|
2013-10-26 19:02:55 +02:00
|
|
|
$(QUIET)test $($(*)_VERSION_CHECK) -eq 0 || \
|
|
|
|
pkg-config --atleast-version $($(*)_MIN_VERSION) $($(*)_PKG_CONFIG_NAME) || ( \
|
|
|
|
echo "The minium required version of $(*) is $($(*)_MIN_VERSION)" && \
|
|
|
|
false \
|
|
|
|
)
|
|
|
|
@mkdir -p .version-checks
|
|
|
|
$(QUIET)touch $@
|
2012-03-16 13:32:09 +01:00
|
|
|
|
2009-12-26 14:30:50 +01:00
|
|
|
options:
|
2010-01-28 13:57:54 +01:00
|
|
|
@echo ${PROJECT} build options:
|
2009-12-26 14:30:50 +01:00
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
2010-03-12 18:23:41 +01:00
|
|
|
@echo "LIBS = ${LIBS}"
|
2009-12-26 14:30:50 +01:00
|
|
|
@echo "DFLAGS = ${DFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
${PROJECT}/version.h: ${PROJECT}/version.h.in config.mk
|
2013-08-22 22:26:52 +02:00
|
|
|
$(QUIET)sed -e 's/ZVMAJOR/${ZATHURA_VERSION_MAJOR}/' \
|
|
|
|
-e 's/ZVMINOR/${ZATHURA_VERSION_MINOR}/' \
|
|
|
|
-e 's/ZVREV/${ZATHURA_VERSION_REV}/' \
|
|
|
|
-e 's/ZVAPI/${ZATHURA_API_VERSION}/' \
|
2014-11-27 18:01:44 +01:00
|
|
|
-e 's/ZVABI/${ZATHURA_ABI_VERSION}/' ${PROJECT}/version.h.in > ${PROJECT}/version.h.tmp
|
|
|
|
$(QUIET)mv ${PROJECT}/version.h.tmp ${PROJECT}/version.h
|
2014-01-11 21:48:41 +01:00
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
${PROJECT}/dbus-interface-definitions.c: data/org.pwmt.zathura.xml
|
2014-04-26 23:08:45 +02:00
|
|
|
$(QUIET)echo '#include "dbus-interface-definitions.h"' > $@.tmp
|
|
|
|
$(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> $@.tmp
|
|
|
|
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> $@.tmp
|
|
|
|
$(QUIET)echo ';' >> $@.tmp
|
2014-04-27 12:32:55 +02:00
|
|
|
$(QUIET)mv $@.tmp $@
|
2014-04-26 23:08:45 +02:00
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
${PROJECT}/css-definitions.c: data/zathura.css_t
|
2014-04-26 23:08:45 +02:00
|
|
|
$(QUIET)echo '#include "css-definitions.h"' > $@.tmp
|
2014-04-26 23:32:38 +02:00
|
|
|
$(QUIET)echo 'const char* CSS_TEMPLATE_INDEX =' >> $@.tmp
|
2014-04-26 23:08:45 +02:00
|
|
|
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' $< >> $@.tmp
|
|
|
|
$(QUIET)echo ';' >> $@.tmp
|
|
|
|
$(QUIET)mv $@.tmp $@
|
2012-02-25 15:21:00 +01:00
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
# release build
|
|
|
|
|
|
|
|
${OBJECTS}: config.mk ${PROJECT}/version.h \
|
|
|
|
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
|
|
|
|
|
|
|
|
${BUILDDIR_RELEASE}/%.o: %.c
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,CC,$<)
|
2014-11-07 15:57:46 +01:00
|
|
|
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
|
|
|
|
@mkdir -p $(dir $(abspath $@))
|
|
|
|
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
|
|
|
|
|
2014-11-07 22:05:03 +01:00
|
|
|
${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}: ${OBJECTS}
|
2014-11-07 15:57:46 +01:00
|
|
|
$(call colorecho,CC,$@)
|
|
|
|
@mkdir -p ${BUILDDIR_RELEASE}/${BINDIR}
|
|
|
|
$(QUIET)${CC} ${SFLAGS} ${LDFLAGS} \
|
|
|
|
-o ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} ${OBJECTS} ${LIBS}
|
2009-12-26 14:30:50 +01:00
|
|
|
|
2014-11-07 22:05:03 +01:00
|
|
|
${PROJECT}: ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
|
|
|
|
|
|
|
|
release: ${PROJECT}
|
|
|
|
|
2014-11-08 02:27:40 +01:00
|
|
|
run: release
|
|
|
|
$(QUIET)./${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT}
|
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
# debug build
|
|
|
|
|
|
|
|
${OBJECTS_DEBUG}: config.mk ${PROJECT}/version.h \
|
|
|
|
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
|
|
|
|
|
|
|
|
${BUILDDIR_DEBUG}/%.o: %.c
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,CC,$<)
|
2014-11-07 15:57:46 +01:00
|
|
|
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
|
|
|
|
@mkdir -p $(dir $(abspath $@))
|
|
|
|
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} \
|
|
|
|
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
|
|
|
|
|
2014-11-07 22:05:03 +01:00
|
|
|
${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}: ${OBJECTS_DEBUG}
|
2014-11-07 15:57:46 +01:00
|
|
|
$(call colorecho,CC,$@)
|
|
|
|
@mkdir -p ${BUILDDIR_DEBUG}/${BINDIR}
|
2014-11-20 13:00:24 +01:00
|
|
|
$(QUIET)${CC} ${LDFLAGS} \
|
|
|
|
-o ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT} ${OBJECTS_DEBUG} ${LIBS}
|
2014-11-07 15:57:46 +01:00
|
|
|
|
2014-11-07 22:05:03 +01:00
|
|
|
debug: ${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
|
2014-11-07 15:57:46 +01:00
|
|
|
|
2014-11-08 02:27:40 +01:00
|
|
|
run-debug: debug
|
|
|
|
$(QUIET)./${BUILDDIR_DEBUG}/${BINDIR}/${PROJECT}
|
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
# gcov build
|
2009-12-26 14:30:50 +01:00
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
${OBJECTS_GCOV}: config.mk ${PROJECT}/version.h \
|
2013-10-26 19:02:55 +02:00
|
|
|
.version-checks/GIRARA .version-checks/GLIB .version-checks/GTK
|
2009-12-26 14:30:50 +01:00
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
${BUILDDIR_GCOV}/%.o: %.c
|
|
|
|
$(call colorecho,CC,$<)
|
|
|
|
@mkdir -p ${DEPENDDIR}/$(dir $(abspath $@))
|
|
|
|
@mkdir -p $(dir $(abspath $@))
|
|
|
|
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${GCOV_CFLAGS} \
|
|
|
|
-o $@ $< -MMD -MF ${DEPENDDIR}/$(abspath $@).dep
|
|
|
|
|
2014-11-07 22:05:03 +01:00
|
|
|
${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}: ${OBJECTS_GCOV}
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,CC,$@)
|
2014-11-07 15:57:46 +01:00
|
|
|
@mkdir -p ${BUILDDIR_GCOV}/${BINDIR}
|
2014-11-20 13:00:24 +01:00
|
|
|
$(QUIET)${CC} ${LDFLAGS} ${GCOV_CFLAGS} ${GCOV_LDFLAGS} \
|
|
|
|
-o ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT} ${OBJECTS_GCOv} ${LIBS}
|
2014-11-07 15:57:46 +01:00
|
|
|
|
2014-11-07 22:05:03 +01:00
|
|
|
gcov: options ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
|
2014-11-07 15:57:46 +01:00
|
|
|
$(QUIET)${MAKE} -C tests run-gcov
|
|
|
|
$(call colorecho,LCOV,"Analyse data")
|
|
|
|
$(QUIET)${LCOV_EXEC} ${LCOV_FLAGS}
|
|
|
|
$(call colorecho,LCOV,"Generate report")
|
|
|
|
$(QUIET)${GENHTML_EXEC} ${GENHTML_FLAGS}
|
|
|
|
|
2014-11-08 02:27:40 +01:00
|
|
|
run-gcov: ${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
|
|
|
|
$(QUIET)./${BUILDDIR_GCOV}/${BINDIR}/${PROJECT}
|
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
# clean
|
2009-08-11 23:18:50 +02:00
|
|
|
|
|
|
|
clean:
|
2014-11-07 15:57:46 +01:00
|
|
|
$(QUIET)rm -rf \
|
|
|
|
${BUILDDIR} \
|
2014-11-07 18:08:59 +01:00
|
|
|
${DEPENDDIR} \
|
2014-04-24 16:57:53 +02:00
|
|
|
${TARFILE} \
|
|
|
|
${TARDIR} \
|
2014-01-11 21:48:41 +01:00
|
|
|
${PROJECT}.pc \
|
2014-11-10 00:20:25 +01:00
|
|
|
${PROJECT}/version.h \
|
|
|
|
${PROJECT}/version.h.tmp \
|
2014-11-07 15:57:46 +01:00
|
|
|
${PROJECT}/dbus-interface-definitions.c \
|
|
|
|
${PROJECT}/dbus-interface-definitions.c.tmp \
|
|
|
|
${PROJECT}/css-definitions.c \
|
|
|
|
${PROJECT}/css-definitions.c.tmp \
|
|
|
|
$(PROJECT).info \
|
|
|
|
gcov \
|
2013-10-26 19:02:55 +02:00
|
|
|
.version-checks
|
2012-09-07 10:45:52 +02:00
|
|
|
$(QUIET)$(MAKE) -C tests clean
|
|
|
|
$(QUIET)$(MAKE) -C po clean
|
2014-04-08 19:56:31 +02:00
|
|
|
$(QUIET)$(MAKE) -C doc clean
|
2009-12-26 14:30:50 +01:00
|
|
|
|
2011-07-10 20:14:31 +02:00
|
|
|
${PROJECT}.pc: ${PROJECT}.pc.in config.mk
|
2011-08-31 16:41:07 +02:00
|
|
|
$(QUIET)echo project=${PROJECT} > ${PROJECT}.pc
|
|
|
|
$(QUIET)echo version=${VERSION} >> ${PROJECT}.pc
|
2012-03-21 11:47:29 +01:00
|
|
|
$(QUIET)echo apiversion=${ZATHURA_API_VERSION} >> ${PROJECT}.pc
|
2012-03-21 16:23:29 +01:00
|
|
|
$(QUIET)echo abiversion=${ZATHURA_ABI_VERSION} >> ${PROJECT}.pc
|
2012-03-08 17:10:31 +01:00
|
|
|
$(QUIET)echo includedir=${INCLUDEDIR} >> ${PROJECT}.pc
|
2012-02-14 16:30:15 +01:00
|
|
|
$(QUIET)echo plugindir=${PLUGINDIR} >> ${PROJECT}.pc
|
2014-01-15 18:50:06 +01:00
|
|
|
$(QUIET)echo GTK_VERSION=3 >> ${PROJECT}.pc
|
2011-08-31 16:41:07 +02:00
|
|
|
$(QUIET)cat ${PROJECT}.pc.in >> ${PROJECT}.pc
|
2011-07-10 20:14:31 +02:00
|
|
|
|
2009-09-12 11:19:51 +02:00
|
|
|
valgrind: debug
|
2012-03-07 16:15:06 +01:00
|
|
|
$(QUIET)G_SLICE=always-malloc G_DEBUG=gc-friendly ${VALGRIND} ${VALGRIND_ARGUMENTS} \
|
|
|
|
./${PROJECT}-debug
|
2009-12-26 14:30:50 +01:00
|
|
|
|
|
|
|
gdb: debug
|
2012-03-06 21:09:58 +01:00
|
|
|
$(QUIET)cgdb ${PROJECT}-debug
|
2009-12-26 14:30:50 +01:00
|
|
|
|
2012-02-21 19:14:27 +01:00
|
|
|
test: ${OBJECTS}
|
2014-11-20 13:10:52 +01:00
|
|
|
$(QUIET)$(MAKE) -C tests run
|
2012-01-28 19:54:10 +01:00
|
|
|
|
2012-03-20 01:07:39 +01:00
|
|
|
dist: clean build-manpages
|
2014-06-24 22:09:18 +02:00
|
|
|
$(QUIET)tar -czf $(TARFILE) --exclude=.gitignore \
|
|
|
|
--transform 's,^,zathura-$(VERSION)/,' \
|
|
|
|
`git ls-files` \
|
|
|
|
doc/_build/$(PROJECT).1 doc/_build/$(PROJECT)rc.5
|
2009-08-11 23:18:50 +02:00
|
|
|
|
2012-02-20 22:23:11 +01:00
|
|
|
doc:
|
2014-11-20 13:10:52 +01:00
|
|
|
$(QUIET)$(MAKE) -C doc
|
2012-02-08 15:19:05 +01:00
|
|
|
|
2012-03-07 15:29:35 +01:00
|
|
|
po:
|
|
|
|
$(QUIET)${MAKE} -C po
|
|
|
|
|
2012-03-08 18:03:19 +01:00
|
|
|
update-po:
|
|
|
|
$(QUIET)${MAKE} -C po update-po
|
|
|
|
|
2012-03-20 01:07:39 +01:00
|
|
|
build-manpages:
|
2014-04-20 01:43:49 +02:00
|
|
|
$(QUIET)${MAKE} -C doc man
|
2012-03-12 19:25:38 +01:00
|
|
|
|
|
|
|
install-manpages: build-manpages
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,INSTALL,"man pages")
|
2012-04-17 21:51:21 +02:00
|
|
|
$(QUIET)mkdir -m 755 -p ${DESTDIR}${MANPREFIX}/man1 ${DESTDIR}${MANPREFIX}/man5
|
2014-04-28 16:22:00 +02:00
|
|
|
ifneq "$(wildcard doc/_build/${PROJECT}.1)" ""
|
|
|
|
$(QUIET)install -m 644 doc/_build/${PROJECT}.1 ${DESTDIR}${MANPREFIX}/man1
|
2012-03-23 22:33:50 +01:00
|
|
|
endif
|
2014-04-28 16:22:00 +02:00
|
|
|
ifneq "$(wildcard doc/_build/${PROJECT}rc.5)" ""
|
|
|
|
$(QUIET)install -m 644 doc/_build/${PROJECT}rc.5 ${DESTDIR}${MANPREFIX}/man5
|
2012-03-23 22:33:50 +01:00
|
|
|
endif
|
2012-03-12 19:25:38 +01:00
|
|
|
|
2012-03-08 17:10:31 +01:00
|
|
|
install-headers: ${PROJECT}.pc
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,INSTALL,"header files")
|
2012-04-17 21:51:21 +02:00
|
|
|
$(QUIET)mkdir -m 755 -p ${DESTDIR}${INCLUDEDIR}/${PROJECT}
|
2012-03-18 19:38:17 +01:00
|
|
|
$(QUIET)install -m 644 ${HEADERINST} ${DESTDIR}${INCLUDEDIR}/${PROJECT}
|
2014-04-24 16:23:19 +02:00
|
|
|
|
|
|
|
$(call colorecho,INSTALL,"pkgconfig file")
|
2012-04-17 21:51:21 +02:00
|
|
|
$(QUIET)mkdir -m 755 -p ${DESTDIR}${LIBDIR}/pkgconfig
|
2012-03-08 17:10:31 +01:00
|
|
|
$(QUIET)install -m 644 ${PROJECT}.pc ${DESTDIR}${LIBDIR}/pkgconfig
|
|
|
|
|
2013-12-24 01:19:50 +01:00
|
|
|
install-dbus:
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,INSTALL,"D-Bus interface definitions")
|
2013-12-24 01:19:50 +01:00
|
|
|
$(QUIET)mkdir -m 755 -p $(DESTDIR)$(DBUSINTERFACEDIR)
|
2014-01-11 21:48:41 +01:00
|
|
|
$(QUIET)install -m 644 data/org.pwmt.zathura.xml $(DESTDIR)$(DBUSINTERFACEDIR)
|
2013-12-27 21:26:38 +01:00
|
|
|
|
2014-09-29 14:44:12 +02:00
|
|
|
install-appdata:
|
|
|
|
$(call colorecho,INSTALL,"AppData file")
|
|
|
|
$(QUIET)mkdir -m 755 -p $(DESTDIR)$(APPDATAPREFIX)
|
|
|
|
$(QUIET)install -m 644 data/$(PROJECT).appdata.xml $(DESTDIR)$(APPDATAPREFIX)
|
|
|
|
|
|
|
|
install: all install-headers install-manpages install-dbus install-appdata
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,INSTALL,"executeable file")
|
2012-04-17 21:51:21 +02:00
|
|
|
$(QUIET)mkdir -m 755 -p ${DESTDIR}${PREFIX}/bin
|
2014-11-07 18:08:59 +01:00
|
|
|
$(QUIET)install -m 755 ${BUILDDIR_RELEASE}/${BINDIR}/${PROJECT} ${DESTDIR}${PREFIX}/bin
|
2012-04-17 21:51:21 +02:00
|
|
|
$(QUIET)mkdir -m 755 -p ${DESTDIR}${DESKTOPPREFIX}
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,INSTALL,"desktop file")
|
2011-09-29 16:06:39 +02:00
|
|
|
$(QUIET)install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX}
|
2012-03-04 18:35:16 +01:00
|
|
|
$(MAKE) -C po install
|
2009-08-11 23:18:50 +02:00
|
|
|
|
2012-03-08 17:10:31 +01:00
|
|
|
uninstall-headers:
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,UNINSTALL,"header files")
|
2012-03-08 17:10:31 +01:00
|
|
|
$(QUIET)rm -rf ${DESTDIR}${INCLUDEDIR}/${PROJECT}
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,UNINSTALL,"pkgconfig file")
|
2012-03-08 17:10:31 +01:00
|
|
|
$(QUIET)rm -f ${DESTDIR}${LIBDIR}/pkgconfig/${PROJECT}.pc
|
|
|
|
|
2012-04-21 02:15:46 +02:00
|
|
|
uninstall: uninstall-headers
|
2011-08-31 16:41:07 +02:00
|
|
|
$(ECHO) removing executable file
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,UNINSTALL,"executeable")
|
2011-08-31 16:41:07 +02:00
|
|
|
$(QUIET)rm -f ${DESTDIR}${PREFIX}/bin/${PROJECT}
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,UNINSTALL,"man pages")
|
2011-08-31 16:41:07 +02:00
|
|
|
$(QUIET)rm -f ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
|
2011-09-29 16:06:39 +02:00
|
|
|
$(QUIET)rm -f ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,UNINSTALL,"desktop file")
|
2011-09-29 16:06:39 +02:00
|
|
|
$(QUIET)rm -f ${DESTDIR}${DESKTOPPREFIX}/${PROJECT}.desktop
|
2014-04-24 16:23:19 +02:00
|
|
|
$(call colorecho,UNINSTALL,"D-Bus interface definitions")
|
2014-01-15 17:56:09 +01:00
|
|
|
$(QUIET)rm -f $(DESTDIR)$(DBUSINTERFACEDIR)/org.pwmt.zathura.xml
|
2014-09-29 14:44:12 +02:00
|
|
|
$(call colorecho,UNINSTALL,"AppData file")
|
|
|
|
$(QUIET)rm -f $(DESTDIR)$(APPDATAPREFIX)/$(PROJECT).appdata.xml
|
2012-03-08 17:10:31 +01:00
|
|
|
$(MAKE) -C po uninstall
|
2011-04-18 11:31:57 +02:00
|
|
|
|
2011-04-19 18:53:41 +02:00
|
|
|
-include $(wildcard .depend/*.dep)
|
2011-04-19 21:54:24 +02:00
|
|
|
|
2014-01-15 17:56:09 +01:00
|
|
|
.PHONY: all options clean doc debug valgrind gdb dist doc install uninstall \
|
|
|
|
test po install-headers uninstall-headers update-po install-manpages \
|
|
|
|
build-manpages install-dbus
|