]> git.sesse.net Git - bmusb/commitdiff
Support overriding pkg-config.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 25 Jul 2019 21:02:00 +0000 (23:02 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 25 Jul 2019 21:02:00 +0000 (23:02 +0200)
Helps with crosscompiling. Patch by Helmut Grohne.

Makefile

index b58db0f8efa578e6403d889e2b0f68fef7b798ca..23b458c94921a5c6f05e293c164168d30d19de43 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
-CXXFLAGS := -std=gnu++14 -O2 -Wall -I. -g $(shell pkg-config libusb-1.0 --cflags) -pthread
-LDFLAGS := $(shell pkg-config libusb-1.0 --libs) -pthread
+PKG_CONFIG ?= pkg-config
+CXXFLAGS := -std=gnu++14 -O2 -Wall -I. -g $(shell $(PKG_CONFIG) libusb-1.0 --cflags) -pthread
+LDFLAGS := $(shell $(PKG_CONFIG) libusb-1.0 --libs) -pthread
 AR := ar
 LN := ln
 RANLIB := ranlib