forked from herbstluftwm/herbstluftwm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.mk
65 lines (58 loc) · 1.8 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
61
62
63
64
65
# paths
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
PKG_CONFIG ?= pkg-config
# Xinerama
XINERAMALIBS = `$(PKG_CONFIG) --silence-errors --libs xinerama`
XINERAMAFLAGS = `$(PKG_CONFIG) --exists xinerama && echo -DXINERAMA`
INCS = -Isrc/ -I/usr/include -I${X11INC} `$(PKG_CONFIG) --cflags glib-2.0`
LIBS = -lc -L${X11LIB} -lXext -lX11 $(XINERAMALIBS) `$(PKG_CONFIG) --libs glib-2.0`
ifeq ($(shell uname),Linux)
LIBS += -lrt
endif
# FLAGS
CC ?= gcc
LD = $(CC)
LDXX ?= g++
CFLAGS ?= -g
CFLAGS += -pedantic -Wall -std=c99
CXXFLAGS ?= -g
CXXFLAGS += -pedantic -Wall -std=c++11 -Wno-sign-compare -Wno-narrowing -Wno-deprecated-register
VERSIONFLAGS = \
-D HERBSTLUFT_VERSION=\"$(VERSION)\" \
-D HERBSTLUFT_VERSION_MAJOR=$(VERSION_MAJOR) \
-D HERBSTLUFT_VERSION_MINOR=$(VERSION_MINOR) \
-D HERBSTLUFT_VERSION_PATCH=$(VERSION_PATCH)
CPPFLAGS ?=
CPPFLAGS += $(INCS) -D _XOPEN_SOURCE=600 $(VERSIONFLAGS) $(XINERAMAFLAGS)
CPPFLAGS += -D HERBSTLUFT_GLOBAL_AUTOSTART=\"$(CONFIGDIR)/autostart\"
LDFLAGS ?= -g
DESTDIR =
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
DATADIR = $(PREFIX)/share
MANDIR = $(DATADIR)/man
MAN1DIR = $(MANDIR)/man1
MAN7DIR = $(MANDIR)/man7
DOCDIR = $(DATADIR)/doc/herbstluftwm
EXAMPLESDIR = $(DOCDIR)/examples
LICENSEDIR = $(DOCDIR)
SYSCONFDIR = /etc
CONFIGDIR = $(SYSCONFDIR)/xdg/herbstluftwm
XSESSIONSDIR = $(DATADIR)/xsessions
ZSHCOMPLETIONDIR = $(DATADIR)/zsh/functions/Completion/X
BASHCOMPLETIONDIR = $(SYSCONFDIR)/bash_completion.d
FISHCOMPLETIONDIR = /usr/share/fish/vendor_completions.d
TARFILE = herbstluftwm-$(SHORTVERSION).tar.gz
A2X = a2x
ASCIIDOC = asciidoc
TMPTARDIR = herbstluftwm-$(SHORTVERSION)
MKDIR = mkdir -p
INSTALL = install
RM = rm -f
RMDIR = rmdir
# Controls verbose build
# Remove the @ to see the actual compiler invocations
VERBOSE = @
# Set this to 0 to disable colors
COLOR = 1