aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar maxice8 <30738253+maxice8@users.noreply.github.com>2018-01-22 11:09:17 -0200
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2018-01-22 18:39:17 +0530
commitff502f0b3ed620d74831cd654d5cbfce595c0770 (patch)
treee61c4b3649e313651272f8ce8f0a064ea6eb0d82 /Makefile
parente797a7eefda614fd26cb76b107aef06e92ede58e (diff)
downloadnnn-ff502f0b3ed620d74831cd654d5cbfce595c0770.tar.gz
Makefile: use PKG_CONFIG instead of hardcoding pkg-config (#78)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e0196c1..9dad2e0 100644
--- a/Makefile
+++ b/Makefile
@@ -3,14 +3,15 @@ VERSION = 1.6
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
STRIP ?= strip
+PKG_CONFIG ?= pkg-config
CFLAGS ?= -O3
CFLAGS += -Wall -Wextra -Wno-unused-parameter
LDLIBS = -lreadline
-ifeq ($(shell pkg-config ncursesw && echo 1),1)
- CFLAGS += $(shell pkg-config --cflags ncursesw)
- LDLIBS += $(shell pkg-config --libs ncursesw)
+ifeq ($(shell $(PKG_CONFIG) ncursesw && echo 1),1)
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw)
+ LDLIBS += $(shell $(PKG_CONFIG) --libs ncursesw)
else
LDLIBS += -lncurses
endif