mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 08:45:59 +01:00
Fix some Makefile issues.
* Ship all database backends. * Remove .depend in clean.
This commit is contained in:
parent
be8b8f3bb7
commit
1c22b4f369
2 changed files with 12 additions and 13 deletions
21
Makefile
21
Makefile
|
@ -4,21 +4,22 @@ include config.mk
|
||||||
include common.mk
|
include common.mk
|
||||||
|
|
||||||
PROJECT = zathura
|
PROJECT = zathura
|
||||||
SOURCE = $(shell find . -iname "*.c" -a ! -iname "database-*" ! -path "*tests*")
|
OSOURCE = $(shell find . -maxdepth 1 -iname "*.c" -a ! -iname "database-*")
|
||||||
HEADER = $(shell find . -iname "*.h")
|
HEADER = $(shell find . -maxdepth 1 -iname "*.h")
|
||||||
OBJECTS = $(patsubst %.c, %.o, $(SOURCE))
|
|
||||||
DOBJECTS = $(patsubst %.c, %.do, $(SOURCE))
|
|
||||||
|
|
||||||
ifeq (${DATABASE}, sqlite)
|
ifeq (${DATABASE}, sqlite)
|
||||||
INCS += $(SQLITE_INC)
|
INCS += $(SQLITE_INC)
|
||||||
LIBS += $(SQLITE_LIB)
|
LIBS += $(SQLITE_LIB)
|
||||||
SOURCE += database-sqlite.c
|
SOURCE = $(OSOURCE) database-sqlite.c
|
||||||
else
|
else
|
||||||
ifeq (${DATABASE}, plain)
|
ifeq (${DATABASE}, plain)
|
||||||
SOURCE += database-plain.c
|
SOURCE = $(OSOURCE) database-plain.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCE))
|
||||||
|
DOBJECTS = $(patsubst %.c, %.do, $(SOURCE))
|
||||||
|
|
||||||
all: options ${PROJECT}
|
all: options ${PROJECT}
|
||||||
|
|
||||||
options:
|
options:
|
||||||
|
@ -89,8 +90,8 @@ dist: clean
|
||||||
$(QUIET)mkdir -p ${PROJECT}-${VERSION}
|
$(QUIET)mkdir -p ${PROJECT}-${VERSION}
|
||||||
$(QUIET)mkdir -p ${PROJECT}-${VERSION}/tests
|
$(QUIET)mkdir -p ${PROJECT}-${VERSION}/tests
|
||||||
$(QUIET)cp LICENSE Makefile config.mk common.mk README AUTHORS Doxyfile \
|
$(QUIET)cp LICENSE Makefile config.mk common.mk README AUTHORS Doxyfile \
|
||||||
${PROJECT}.1.rst ${PROJECT}rc.5.rst ${SOURCE} ${HEADER} ${PROJECT}.pc.in \
|
${PROJECT}.1.rst ${PROJECT}rc.5.rst ${OSOURCE} ${HEADER} ${PROJECT}.pc.in \
|
||||||
${PROJECT}.desktop version.h.in \
|
${PROJECT}.desktop version.h.in database-*.c \
|
||||||
${PROJECT}-${VERSION}
|
${PROJECT}-${VERSION}
|
||||||
$(QUIET)cp tests/Makefile tests/config.mk tests/*.c \
|
$(QUIET)cp tests/Makefile tests/config.mk tests/*.c \
|
||||||
${PROJECT}-${VERSION}/tests
|
${PROJECT}-${VERSION}/tests
|
||||||
|
@ -113,9 +114,7 @@ install: all ${PROJECT}.pc
|
||||||
$(QUIET)install -m 755 ${PROJECT} ${DESTDIR}${PREFIX}/bin
|
$(QUIET)install -m 755 ${PROJECT} ${DESTDIR}${PREFIX}/bin
|
||||||
$(ECHO) installing header files
|
$(ECHO) installing header files
|
||||||
$(QUIET)mkdir -p ${DESTDIR}${PREFIX}/include/${PROJECT}
|
$(QUIET)mkdir -p ${DESTDIR}${PREFIX}/include/${PROJECT}
|
||||||
$(QUIET)cp -f version.h ${DESTDIR}${PREFIX}/include/${PROJECT}
|
$(QUIET)install -m 644 zathura.h document.h version.h ${DESTDIR}${PREFIX}/include/${PROJECT}
|
||||||
$(QUIET)cp -f document.h ${DESTDIR}${PREFIX}/include/${PROJECT}
|
|
||||||
$(QUIET)cp -f zathura.h ${DESTDIR}${PREFIX}/include/${PROJECT}
|
|
||||||
$(ECHO) installing manual pages
|
$(ECHO) installing manual pages
|
||||||
$(QUIET)mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
$(QUIET)mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
||||||
$(QUIET)if which rst2man > /dev/null ; then \
|
$(QUIET)if which rst2man > /dev/null ; then \
|
||||||
|
|
|
@ -8,7 +8,7 @@ PROJECT = tests
|
||||||
SOURCE = tests.c $(wildcard test_*.c)
|
SOURCE = tests.c $(wildcard test_*.c)
|
||||||
OBJECTS = ${SOURCE:.c=.o}
|
OBJECTS = ${SOURCE:.c=.o}
|
||||||
|
|
||||||
ZSOURCE = $(shell find ../ -iname "*.c" -a ! -iname "database-*" ! -iname "main.c" ! -path "*tests*")
|
ZSOURCE = $(shell find ../ -maxdepth 1 -iname "*.c" -a ! -iname "database-*" ! -iname "main.c")
|
||||||
ZOBJECTS = ${ZSOURCE:.c=.o}
|
ZOBJECTS = ${ZSOURCE:.c=.o}
|
||||||
|
|
||||||
ifeq (${DATABASE}, sqlite)
|
ifeq (${DATABASE}, sqlite)
|
||||||
|
@ -46,7 +46,7 @@ ${PROJECT}: options ${OBJECTS}
|
||||||
${OBJECTS}: ../config.mk
|
${OBJECTS}: ../config.mk
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(QUIET)rm -rf ${OBJECTS} ${PROJECT} *.gcno *.gcda
|
$(QUIET)rm -rf ${OBJECTS} ${PROJECT} *.gcno *.gcda .depend
|
||||||
|
|
||||||
.PHONY: all options clean debug run
|
.PHONY: all options clean debug run
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue