Commit 95c3037a authored by Moritz Lipp's avatar Moritz Lipp
Browse files

Updated Makefile and register file type

parent dc706aa9
......@@ -20,6 +20,9 @@ CFLAGS += -std=c99 -pedantic -Wall -Wno-format-zero-length $(INCS)
# debug
DFLAGS = -g
# ld
LDFLAGS = -rdynamic
# compiler
CC ?= gcc
......
......@@ -29,11 +29,11 @@ ${DOBJECTS}: config.mk
${PLUGIN}: ${OBJECTS}
@echo LD $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS)
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS) ${LIBS}
${PLUGIN}-debug: ${DOBJECTS}
@echo LD $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS)
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS) ${LIBS}
clean:
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so
......
......@@ -5,6 +5,15 @@
#include "djvu.h"
#include "../../zathura.h"
bool
plugin_register(void)
{
zathura_document_plugin_register("djvu", djvu_document_open);
zathura_document_plugin_register("DJVU", djvu_document_open);
return true;
}
bool
djvu_document_open(zathura_document_t* document)
{
......
......@@ -29,11 +29,11 @@ ${DOBJECTS}: config.mk
${PLUGIN}: ${OBJECTS}
@echo LD $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS)
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS) ${LIBS}
${PLUGIN}-debug: ${DOBJECTS}
@echo LD $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS)
@${CC} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS) ${LIBS}
clean:
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so
......
......@@ -6,6 +6,15 @@
#include "pdf.h"
#include "../../zathura.h"
bool
plugin_register(void)
{
zathura_document_plugin_register("pdf", pdf_document_open);
zathura_document_plugin_register("PDF", pdf_document_open);
return true;
}
bool
pdf_document_open(zathura_document_t* document)
{
......
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