]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw/Makefile use pkg-config if passed from environmental var.
authorKarl Hiramoto <karl@hiramoto.org>
Wed, 13 May 2009 09:16:18 +0000 (11:16 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Wed, 13 May 2009 09:35:08 +0000 (11:35 +0200)
This patch makes cross compiling easier.

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
Makefile

index 6d232c5422ffdb45a1f8b8febf9d9f621a8d9973..56a11e69c619ce7b0c2ee9643495e6e5aebe5709 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ MAKEFLAGS += --no-print-directory
 PREFIX ?= /usr
 BINDIR ?= $(PREFIX)/bin
 MANDIR ?= $(PREFIX)/share/man
+PKG_CONFIG ?= pkg-config
 
 MKDIR ?= mkdir -p
 INSTALL ?= install
@@ -16,8 +17,8 @@ CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
 OBJS = iw.o genl.o event.o info.o phy.o interface.o ibss.o station.o util.o mesh.o mpath.o scan.o reg.o version.o reason.o status.o
 ALL = iw
 
-NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y)
-NL2FOUND := $(shell pkg-config --atleast-version=2 libnl-2.0 && echo Y)
+NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y)
+NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y)
 
 ifeq ($(NL1FOUND),Y)
 NLLIBNAME = libnl-1