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

Updated Makefiles (not finished)

parent 52377b99
# See LICENSE file for license and copyright information
# zathura - user interface
include config.mk
PROJECT = zathura
SOURCE = $(shell find . -iname "*.c" -a ! -iwholename "*./doc*|*./ft*")
SOURCE = $(shell find . -iname "*.c" -a ! -iwholename "*./ft*")
OBJECTS = $(patsubst %.c, %.o, $(SOURCE))
DOBJECTS = $(patsubst %.c, %.do, $(SOURCE))
all: options ${PROJECT}
make -C ft
options:
@echo ${PROJECT} build options:
......@@ -35,12 +35,14 @@ ${PROJECT}: ${OBJECTS}
clean:
@rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
${DOBJECTS} ${PROJECT}-debug
make -C ft clean
${PROJECT}-debug: ${DOBJECTS}
@echo CC -o ${PROJECT}-debug
@${CC} ${LDFLAGS} -o ${PROJECT}-debug ${DOBJECTS} ${LIBS}
debug: ${PROJECT}-debug
make -C ft debug
valgrind: debug
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \
......
......@@ -8,8 +8,8 @@ PREFIX ?= /usr
MANPREFIX ?= ${PREFIX}/share/man
# libs
GTK_INC = $(shell pkg-config --cflags gtk+-2.0 poppler-glib ddjvuapi)
GTK_LIB = $(shell pkg-config --libs gtk+-2.0 gthread-2.0 poppler-glib ddjvuapi)
GTK_INC = $(shell pkg-config --cflags gtk+-2.0)
GTK_LIB = $(shell pkg-config --libs gtk+-2.0 gthread-2.0)
INCS = -I. -I/usr/include ${GTK_INC}
LIBS = -lc ${GTK_LIB} -lpthread -lm -lgirara -ldl
......
# See LICENSE file for license and copyright information
SUBDIRS = $(shell find -mindepth 2 -maxdepth 2 -iname "Makefile" -exec dirname '{}' \;)
all:
@for dir in ${SUBDIRS}; do ${MAKE} -C $${dir}; done
debug:
@for dir in ${SUBDIRS}; do ${MAKE} -C $${dir} clean; done
clean:
@for dir in ${SUBDIRS}; do ${MAKE} -C $${dir} clean; done
install:
@for dir in ${SUBDIRS}; do ${MAKE} -C $${dir} install; done
uninstall:
@for dir in ${SUBDIRS}; do ${MAKE} -C $${dir} uninstall; done
# 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 $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS)
${PLUGIN}-debug: ${DOBJECTS}
@echo LD $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS)
clean:
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so
debug: options ${PLUGIN}-debug
@make -C debug
# See LICENSE file for license and copyright information
# paths
PREFIX ?= /usr
# libs
DJVU_INC = $(shell pkg-config --cflags gtk+-2.0 ddjvuapi)
DJVU_LIB = $(shell pkg-config --libs gtk+-2.0 ddjvuapi)
INCS = -I. -I/usr/include ${DJVU_INC}
LIBS = -lc ${DJVU_LIB}
# flags
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)
# debug
DFLAGS = -g
# compiler
CC ?= gcc
LD ?= ld
# See LICENSE file for license and copyright information
include config.mk
PLUGIN = pdf
SOURCE = pdf.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 $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}.so $(OBJECTS)
${PLUGIN}-debug: ${DOBJECTS}
@echo LD $@
@${LD} -shared ${LDFLAGS} -o ${PLUGIN}-debug.so $(DOBJECTS)
clean:
@rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so ${PLUGIN}-debug.so
debug: options ${PLUGIN}-debug
@make -C debug
# See LICENSE file for license and copyright information
# paths
PREFIX ?= /usr
# libs
PDF_INC = $(shell pkg-config --cflags gtk+-2.0 poppler-glib)
PDF_LIB = $(shell pkg-config --libs gtk+-2.0 poppler-glib)
INCS = -I. -I/usr/include ${PDF_INC}
LIBS = -lc ${PDF_LIB}
# flags
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)
# debug
DFLAGS = -g
# compiler
CC ?= gcc
LD ?= ld
......@@ -5,8 +5,8 @@
#include <stdbool.h>
#include <girara.h>
#include <render.h>
#include "render.h"
#include "document.h"
enum { NEXT, PREVIOUS, LEFT, RIGHT, UP, DOWN, BOTTOM, TOP, HIDE, HIGHLIGHT,
......
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