diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-02-03 12:41:00 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-02-03 13:37:09 +1100 |
| commit | 52016d32bc40fe0ac6a8886e31b48169810efaad (patch) | |
| tree | 13b9783fd9f9f1b45f91e7de6f99a00011433121 /src | |
| parent | 90c16d2b0d28c4e5607c94c46ebab383796a34f5 (diff) | |
Makefile: Only check for pkg-config when on a system that uses it
This fixes compilation on OSX where pkg-config is not installed
by default.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile index 3a115c29..f315d007 100644 --- a/src/Makefile +++ b/src/Makefile @@ -54,6 +54,10 @@ else ifneq (,$(findstring CYGWIN,$(os))) CPPFLAGS += -D_XOPEN_SOURCE=700 LIBS += -lncursesw -ldbghelp else + ifeq ($(PKG_CONFIG),) + $(error "pkg-config not found in PATH") + endif + LIBS += $(shell $(PKG_CONFIG) --libs ncursesw) CPPFLAGS += $(shell $(PKG_CONFIG) --cflags ncursesw) LDFLAGS += -rdynamic @@ -66,12 +70,7 @@ endif CXXFLAGS += -pedantic -std=gnu++14 -g -Wall -Wextra -Wno-unused-parameter -Wno-reorder -Wno-sign-compare -Wno-address -Wno-noexcept-type -Wno-unknown-attributes -Wno-unknown-warning-option -all : check_pkg_config kak - -check_pkg_config: -ifeq ($(PKG_CONFIG),) - $(error "pkg-config not found in PATH") -endif +all : kak kak : kak$(suffix) ln -sf $< $@ |
