2011-03-05 22:11:08 +01:00
|
|
|
# See LICENSE file for license and copyright information
|
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
|
|
|
PLUGIN = djvu
|
|
|
|
SOURCE = djvu.c
|
|
|
|
OBJECTS = ${SOURCE:.c=.o}
|
|
|
|
DOBJECTS = ${SOURCE:.c=.do}
|
|
|
|
|
|
|
|
all: options ${PLUGIN}
|
|
|
|
|
|
|
|
options:
|
|
|
|
@echo ${PLUGIN} build options:
|
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
|
|
@echo "DFLAGS = ${DFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@echo CC $<
|
|
|
|
@${CC} -c ${CFLAGS} -o $@ $<
|
|
|
|
|
|
|
|
%.do: %.c
|
|
|
|
@echo CC $<
|
|
|
|
@${CC} -c ${CFLAGS} ${DFLAGS} -o $@ $<
|
|
|
|
|
|
|
|
${OBJECTS}: config.mk
|
|
|
|
${DOBJECTS}: config.mk
|
|
|
|
|
|
|
|
${PLUGIN}: ${OBJECTS}
|
|
|
|
@echo LD $@
|
2011-03-06 01:43:04 +01:00
|
|
|
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS) ${LIBS}
|
2011-03-05 22:11:08 +01:00
|
|
|
|
|
|
|
${PLUGIN}-debug: ${DOBJECTS}
|
|
|
|
@echo LD $@
|
2011-03-06 02:21:46 +01:00
|
|
|
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(DOBJECTS) ${LIBS}
|
2011-03-05 22:11:08 +01:00
|
|
|
|
|
|
|
clean:
|
2011-03-06 02:21:46 +01:00
|
|
|
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so
|
2011-03-05 22:11:08 +01:00
|
|
|
|
|
|
|
debug: options ${PLUGIN}-debug
|
2011-03-06 09:19:21 +01:00
|
|
|
|
|
|
|
install: all
|
|
|
|
@echo installing ${PLUGIN} plugin
|
|
|
|
@mkdir -p ${DESTDIR}${PREFIX}/lib/zathura
|
|
|
|
@cp -f ${PLUGIN}.so ${DESTDIR}${PREFIX}/lib/zathura
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
@echo uninstalling ${PLUGIN} plugin
|
|
|
|
@rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so
|
|
|
|
@rm -rf ${DESTDIR}${PREFIX}/lib/zathura
|