mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Add PKG_CONFIG variable and replace pkg-config
Respect pkg-config value from environment.
This commit is contained in:
parent
70e29e35f2
commit
54badc02f7
9
Makefile
9
Makefile
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
PREFIX?=/usr/local
|
PREFIX?=/usr/local
|
||||||
|
PKG_CONFIG?=pkg-config
|
||||||
INSTALL=install
|
INSTALL=install
|
||||||
CFLAGS+=-std=gnu89 -O2 -g -MMD -Wall \
|
CFLAGS+=-std=gnu89 -O2 -g -MMD -Wall \
|
||||||
-Wno-pointer-sign \
|
-Wno-pointer-sign \
|
||||||
@ -36,13 +37,13 @@ endif
|
|||||||
|
|
||||||
PKGCONFIG_LIBS="blkid uuid liburcu libsodium zlib liblz4 libzstd"
|
PKGCONFIG_LIBS="blkid uuid liburcu libsodium zlib liblz4 libzstd"
|
||||||
|
|
||||||
PKGCONFIG_CFLAGS:=$(shell pkg-config --cflags $(PKGCONFIG_LIBS))
|
PKGCONFIG_CFLAGS:=$(shell $(PKG_CONFIG) --cflags $(PKGCONFIG_LIBS))
|
||||||
ifeq (,$(PKGCONFIG_CFLAGS))
|
ifeq (,$(PKGCONFIG_CFLAGS))
|
||||||
$(error pkg-config error)
|
$(error pkg-config error, command: $(PKG_CONFIG) --cflags $(PKGCONFIG_LIBS))
|
||||||
endif
|
endif
|
||||||
PKGCONFIG_LDLIBS:=$(shell pkg-config --libs $(PKGCONFIG_LIBS))
|
PKGCONFIG_LDLIBS:=$(shell $(PKG_CONFIG) --libs $(PKGCONFIG_LIBS))
|
||||||
ifeq (,$(PKGCONFIG_LDLIBS))
|
ifeq (,$(PKGCONFIG_LDLIBS))
|
||||||
$(error pkg-config error (libs))
|
$(error pkg-config error, command: $(PKG_CONFIG) --libs $(PKGCONFIG_LIBS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS+=$(PKGCONFIG_CFLAGS)
|
CFLAGS+=$(PKGCONFIG_CFLAGS)
|
||||||
|
Loading…
Reference in New Issue
Block a user