Commit bd8b98a0 authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Update Makefile and added Doxyfile

parent c6cc6a76
# See LICENSE file for license and copyright information
# General information
PROJECT_NAME = zathura-djvu
OUTPUT_DIRECTORY = ./doc/
OUTPUT_LANGUAGE = English
TAB_SIZE = 2
EXTRACT_ALL = YES
OPTIMIZE_OUTPUT_FOR_C = YES
DOXYFILE_ENCODING = UTF-8
TYPEDEF_HIDES_STRUCT = YES
# Warning and progress messages
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
# Input files
INPUT =
FILE_PATTERNS = *.h *.c
RECURSIVE = YES
# Output files
GENERATE_HTML = YES
GENERATE_LATEX = NO
GENERATE_RTF = NO
GENERATE_XML = NO
SOURCE_BROWSER = YES
# See LICENSE file for license and copyright information
include config.mk
include common.mk
PROJECT = zathura-djvu
PLUGIN = djvu
SOURCE = djvu.c
SOURCE = $(shell find . -iname "*.c")
HEADER = $(shell find . -iname "*.h")
OBJECTS = ${SOURCE:.c=.o}
DOBJECTS = ${SOURCE:.c=.do}
......@@ -14,48 +17,60 @@ endif
all: options ${PLUGIN}
options:
@echo ${PLUGIN} build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "DFLAGS = ${DFLAGS}"
@echo "CC = ${CC}"
$(ECHO) ${PLUGIN} build options:
$(ECHO) "CFLAGS = ${CFLAGS}"
$(ECHO) "LDFLAGS = ${LDFLAGS}"
$(ECHO) "DFLAGS = ${DFLAGS}"
$(ECHO) "CC = ${CC}"
%.o: %.c
@echo CC $<
$(ECHO) CC $<
@mkdir -p .depend
@${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
%.do: %.c
@echo CC $<
$(ECHO) CC $<
@mkdir -p .depend
@${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
$(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep
${OBJECTS}: config.mk
${DOBJECTS}: config.mk
${PLUGIN}: ${OBJECTS}
@echo LD $@
${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS) ${LIBS}
$(ECHO) LD $@
$(QUIET)${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS) ${LIBS}
${PLUGIN}-debug: ${DOBJECTS}
@echo LD $@
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS}
$(ECHO) LD $@
$(QUIET)${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS}
clean:
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so .depend
$(QUIET)rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so doc .depend \
${PROJECT}-${VERSION}.tar.gz
debug: options ${PLUGIN}-debug
dist: clean
$(QUIET)mkdir -p ${PROJECT}-${VERSION}
$(QUIET)cp -R LICENSE Makefile config.mk common.mk Doxyfile \
${HEADER} ${SOURCE} ${PROJECT}-${VERSION}
$(QUIET)tar -cf ${PROJECT}-${VERSION}.tar ${PROJECT}-${VERSION}
$(QUIET)gzip ${PROJECT}-${VERSION}.tar
$(QUIET)rm -rf ${PROJECT}-${VERSION}
doc: clean
$(QUIET)doxygen Doxyfile
install: all
@echo installing ${PLUGIN} plugin
@mkdir -p ${DESTDIR}${PREFIX}/lib/zathura
@cp -f ${PLUGIN}.so ${DESTDIR}${PREFIX}/lib/zathura
$(ECHO) installing ${PLUGIN} plugin
$(QUIET)mkdir -p ${DESTDIR}${PREFIX}/lib/zathura
$(QUIET)cp -f ${PLUGIN}.so ${DESTDIR}${PREFIX}/lib/zathura
uninstall:
@echo uninstalling ${PLUGIN} plugin
@rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so
@rmdir ${DESTDIR}${PREFIX}/lib/zathura 2> /dev/null || /bin/true
$(ECHO) uninstalling ${PLUGIN} plugin
$(QUIET)rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so
$(QUIET)rmdir ${DESTDIR}${PREFIX}/lib/zathura 2> /dev/null || /bin/true
-include $(wildcard .depend/*.dep)
.PHONY: all options clean debug install uninstall
.PHONY: all options clean debug doc dist install uninstall
# See LICENSE file for license and copyright information
ifeq "$(VERBOSE)" "0"
ECHO=@echo
QUIET=@
else
ECHO=@\#
QUIET=
endif
# See LICENSE file for license and copyright information
VERSION = 0.0.1
# paths
PREFIX ?= /usr
......@@ -28,3 +30,6 @@ WITH_CAIRO ?= 1
# compiler
CC ?= gcc
LD ?= ld
# set to something != 0 if you want verbose build output
VERBOSE ?= 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment