Commit f92e7dcd authored by Moritz Lipp's avatar Moritz Lipp

Update Makefile

parent 295e8a39
# See LICENSE file for license and copyright information
include config.mk
include common.mk
PROJECT = zathura-pdf-mupdf
PLUGIN = pdf
SOURCE = pdf.c
SOURCE = $(shell find . -iname "*.c")
HEADER = $(shell find . -iname "*.h")
OBJECTS = ${SOURCE:.c=.o}
DOBJECTS = ${SOURCE:.c=.do}
......@@ -14,50 +17,59 @@ 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)
......
# 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
......@@ -25,3 +27,6 @@ WITH_CAIRO ?= 1
# compiler
CC ?= gcc
LD ?= ld
# set to something != 0 if you want verbose build output
VERBOSE ?= 0
Markdown is supported
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