-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk
60 lines (48 loc) · 1.07 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
49
50
51
52
53
54
55
56
57
58
59
60
VERSION = 1.1.0
CC = gcc
EXTRAFLAGS = -g -Wshadow -Wformat=2 -Wconversion -Wextra
CPPFLAGS =
CFLAGS = -std=c11 -pedantic -Wall -Wshadow -Wconversion -D_XOPEN_SOURCE=700
LDFLAGS =
# additional cflags
ifeq ($(DEBUG),1)
CFLAGS += -g -DDEBUG
else
CFLAGS += -O3
endif
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
DOCPREFIX = ${PREFIX}/share/doc
# dependency lists
DEPENDENCIES = inih
# configure lib support (uncomment to disable)
X11_SUPPORT = true # requires xrandr
IMLIB2_SUPPORT = true
CANBERRA_SUPPORT = true
LIBNOTIFY_SUPPORT = true
# x11 support
ifdef X11_SUPPORT
DEPENDENCIES += x11 xrandr xi
CFLAGS += -DX11
endif
# xrandr support
ifdef XRANDR_SUPPORT
endif
# imlib2 support
ifdef IMLIB2_SUPPORT
DEPENDENCIES += imlib2
CFLAGS += -DIMLIB2
endif
# libcanberra support
ifdef CANBERRA_SUPPORT
DEPENDENCIES += libcanberra
CFLAGS += -DCANBERRA
endif
# libcanberra support
ifdef LIBNOTIFY_SUPPORT
DEPENDENCIES += libnotify
CFLAGS += -DLIBNOTIFY
endif
CFLAGS += `pkg-config --cflags $(DEPENDENCIES)`
LIBS += `pkg-config --libs $(DEPENDENCIES)`