-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.mk
48 lines (34 loc) · 1.12 KB
/
config.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# See LICENSE file for license and copyright information
VERSION = 0.1.0
# minimum required zathura version
ZATHURA_MIN_VERSION = 0.1.1
ZATHURA_VERSION_CHECK ?= $(shell pkg-config --atleast-version=$(ZATHURA_MIN_VERSION) zathura; echo $$?)
# paths
PREFIX ?= /usr
LIBDIR ?= ${PREFIX}/lib
# libs
CAIRO_INC ?= $(shell pkg-config --cflags cairo)
CAIRO_LIB ?= $(shell pkg-config --libs cairo)
GTK_INC ?= $(shell pkg-config --cflags gtk+-3.0)
GTK_LIB ?= $(shell pkg-config --libs gtk+-3.0)
WEBKIT_INC ?= $(shell pkg-config --cflags webkitgtk-3.0)
WEBKIT_LIB ?= $(shell pkg-config --libs webkitgtk-3.0)
ZATHURA_INC ?= $(shell pkg-config --cflags zathura)
INCS = ${GIRARA_INC} ${GTK_INC} ${WEBKIT_INC} ${ZATHURA_INC}
LIBS = ${GIRARA_LIB} ${GTK_LIB} ${WEBKIT_LIB}
# plugindir
PLUGINDIR ?= $(shell pkg-config --variable=plugindir zathura)
ifeq (,${PLUGINDIR})
PLUGINDIR = ${LIBDIR}/zathura
endif
# flags
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)
# debug
DFLAGS ?= -g
# build with cairo support?
WITH_CAIRO ?= 1
# compiler
CC ?= gcc
LD ?= ld
# set to something != 0 if you want verbose build output
VERBOSE ?= 0