summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoverstreet <kent.overstreet@gmail.com>2018-08-08 23:05:47 -0400
committerGitHub <noreply@github.com>2018-08-08 23:05:47 -0400
commit494f8d187c74f557dfebbb5dc3591453436b507b (patch)
tree6682170b756aeade501703565e8ec065a22802ff
parenta73679b22c333763597d39c72112ef5a53f55419 (diff)
parent6977078e752b8864f52e36163475f894ff8b73f0 (diff)
Merge pull request #4 from basak/cross-buildHEADmaster
Make pkg-config command substitutable
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index c824ae3..c60e814 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ UDEVLIBDIR=/lib/udev
DRACUTLIBDIR=/lib/dracut
INSTALL=install
CFLAGS+=-O2 -Wall -g
+PKG_CONFIG ?= pkg-config
all: make-bcache probe-bcache bcache-super-show bcache-register
@@ -20,13 +21,13 @@ install: make-bcache probe-bcache bcache-super-show
clean:
$(RM) -f make-bcache probe-bcache bcache-super-show bcache-test -- *.o
-bcache-test: LDLIBS += `pkg-config --libs openssl` -lm
-make-bcache: LDLIBS += `pkg-config --libs uuid blkid`
-make-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
+bcache-test: LDLIBS += `$(PKG_CONFIG) --libs openssl` -lm
+make-bcache: LDLIBS += `$(PKG_CONFIG) --libs uuid blkid`
+make-bcache: CFLAGS += `$(PKG_CONFIG) --cflags uuid blkid`
make-bcache: bcache.o
-probe-bcache: LDLIBS += `pkg-config --libs uuid blkid`
-probe-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
-bcache-super-show: LDLIBS += `pkg-config --libs uuid`
+probe-bcache: LDLIBS += `$(PKG_CONFIG) --libs uuid blkid`
+probe-bcache: CFLAGS += `$(PKG_CONFIG) --cflags uuid blkid`
+bcache-super-show: LDLIBS += `$(PKG_CONFIG) --libs uuid`
bcache-super-show: CFLAGS += -std=gnu99
bcache-super-show: bcache.o
bcache-register: bcache-register.o