Browse Source

Merge pull request #14 from ony/master

Make pkg-config configurable
master
Michael Stapelberg 10 years ago
parent
commit
a0ac8cd87d
  1. 9
      Makefile

9
Makefile

@ -1,18 +1,19 @@
INSTALL=install INSTALL=install
PREFIX=/usr PREFIX=/usr
SYSCONFDIR=/etc SYSCONFDIR=/etc
PKG_CONFIG=pkg-config
# Check if pkg-config is installed, we need it for building CFLAGS/LIBS # 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) ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
$(error "pkg-config was not found") $(error "$(PKG_CONFIG) was not found")
endif endif
CFLAGS += -std=c99 CFLAGS += -std=c99
CFLAGS += -pipe CFLAGS += -pipe
CFLAGS += -Wall CFLAGS += -Wall
CPPFLAGS += -D_GNU_SOURCE CPPFLAGS += -D_GNU_SOURCE
CFLAGS += $(shell pkg-config --cflags 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 += $(shell $(PKG_CONFIG) --libs cairo xcb-dpms xcb-xinerama xcb-atom xcb-image xcb-xkb xkbcommon xkbcommon-x11)
LIBS += -lpam LIBS += -lpam
LIBS += -lev LIBS += -lev
LIBS += -lm LIBS += -lm

Loading…
Cancel
Save