Skip to content

Commit

Permalink
Give error message if pkg-config is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth committed Jul 29, 2019
1 parent 1853f4b commit 4335890
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@ else
# If pkg-config sysroot isn't set, then assume Nerves
CFLAGS += -I$(NERVES_SDK_SYSROOT)/usr/include/libnl3
else

# Use pkg-config to find libnl
CFLAGS += $(shell pkg-config --cflags libnl-genl-3.0)
PKG_CONFIG = $(shell which pkg-config)
ifeq ($(PKG_CONFIG),)
$(error pkg-config required to build. Install by running "brew install pkg-config")
endif

CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-genl-3.0)
endif
endif
DEFAULT_TARGETS ?= $(PREFIX) \
Expand Down

0 comments on commit 4335890

Please sign in to comment.