summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@users.noreply.github.com>2015-04-27 09:44:57 -0700
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2015-04-27 09:44:57 -0700
commita0ac8cd87d1167ae48b6875e8385d03d8b0a73b8 (patch)
tree8e227707da43d801c342a5c37ec5b9751013c4f9
parent8a49effade98ff41bb5a34185c4cfd5590ab5483 (diff)
parenta02789367c017ad7de2d6de6654d0491d32a348d (diff)
Merge pull request #14 from ony/master
Make pkg-config configurable
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d91eaf7..62c1eec 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,19 @@
INSTALL=install
PREFIX=/usr
SYSCONFDIR=/etc
+PKG_CONFIG=pkg-config
# Check if pkg-config is installed, we need it for building CFLAGS/LIBS
-ifeq ($(shell which pkg-config 2>/dev/null 1>/dev/null || echo 1),1)
-$(error "pkg-config was not found")
+ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
+$(error "$(PKG_CONFIG) was not found")
endif
CFLAGS += -std=c99
CFLAGS += -pipe
CFLAGS += -Wall
CPPFLAGS += -D_GNU_SOURCE
-CFLAGS += $(shell pkg-config --cflags cairo xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
-LIBS += $(shell pkg-config --libs cairo xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+CFLAGS += $(shell $(PKG_CONFIG) --cflags cairo xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
+LIBS += $(shell $(PKG_CONFIG) --libs cairo xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
LIBS += -lpam
LIBS += -lev
LIBS += -lm