-
Notifications
You must be signed in to change notification settings - Fork 13
/
config.mk
32 lines (23 loc) · 901 Bytes
/
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
VERSION ?= "1.11.1-SNAPSHOT"
PREFIX ?= /usr/local
PREFIX_ETC ?= /usr/local
ROOT_ETC ?= /etc
INCS = -Iinc -Ipro -Ilib/col/inc
CPPFLAGS += $(INCS) -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DROOT_ETC=\"$(ROOT_ETC)\"
OFLAGS = -O3
WFLAGS = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-result
DFLAGS = -g
COMPFLAGS = $(WFLAGS) $(OFLAGS) $(DFLAGS)
CFLAGS += $(COMPFLAGS) -std=gnu17 -Wold-style-definition -Wstrict-prototypes
CXXFLAGS += $(COMPFLAGS) -std=gnu++17
LDFLAGS +=
ifeq (,$(filter-out DragonFly FreeBSD NetBSD OpenBSD,$(shell uname -s)))
PKGS += epoll-shim libinotify
endif
PKGS += wayland-client yaml-cpp libinput libudev
PKG_CONFIG ?= pkg-config
CFLAGS += $(foreach p,$(PKGS),$(shell $(PKG_CONFIG) --cflags $(p)))
CXXFLAGS += $(foreach p,$(PKGS),$(shell $(PKG_CONFIG) --cflags $(p)))
LDLIBS += $(foreach p,$(PKGS),$(shell $(PKG_CONFIG) --libs $(p)))
CC = gcc
CXX = g++