Updated Makefile and register file type

This commit is contained in:
Moritz Lipp 2011-03-06 01:43:04 +01:00
parent dc706aa912
commit 95c3037a45
5 changed files with 25 additions and 4 deletions

View file

@ -20,6 +20,9 @@ CFLAGS += -std=c99 -pedantic -Wall -Wno-format-zero-length $(INCS)
# debug
DFLAGS = -g
# ld
LDFLAGS = -rdynamic
# compiler
CC ?= gcc

View file

@ -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

View file

@ -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)
{

View file

@ -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

View file

@ -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)
{