summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-07-27 05:56:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-07-27 05:56:38 +0000
commit9cd57a8fc7df0c5c72a1da1e5de093138ad0d3f7 (patch)
treeabe29ff62a26e56b3299ec9806551cf4efe1924f /src/Makefile
parent79b53d4d76bbbb4235eaf709a6f07247f47316de (diff)
downloadapk-tools-9cd57a8fc7df0c5c72a1da1e5de093138ad0d3f7.tar.gz
apk-tools-9cd57a8fc7df0c5c72a1da1e5de093138ad0d3f7.tar.bz2
apk-tools-9cd57a8fc7df0c5c72a1da1e5de093138ad0d3f7.tar.xz
apk-tools-9cd57a8fc7df0c5c72a1da1e5de093138ad0d3f7.zip
Makefile: make it possible to override pkg-config via PKG_CONFIG
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 1f4e90e..e3b7dfb 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,4 +1,5 @@
PKGDEPS := openssl zlib
+PKG_CONFIG ?= pkg-config
# lua module
ifneq ($(LUAAPK),)
@@ -13,7 +14,7 @@ install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) \
$(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR)
endif
-ifeq ($(shell pkg-config --print-errors --exists $(PKGDEPS) || echo fail),fail)
+ifeq ($(shell $(PKG_CONFIG) --print-errors --exists $(PKGDEPS) || echo fail),fail)
$(error Build dependencies are not met)
endif
@@ -55,9 +56,9 @@ LDFLAGS_apk.static := -static
LDFLAGS_apk += -nopie -L$(obj)
LDFLAGS_apk_test += -nopie -L$(obj)
-CFLAGS_ALL += $(shell pkg-config --cflags $(PKGDEPS))
+CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS))
LIBS := -Wl,--as-needed \
- $(shell pkg-config --libs $(PKGDEPS)) \
+ $(shell $(PKG_CONFIG) --libs $(PKGDEPS)) \
-Wl,--no-as-needed
$(obj)/apk: $(LIBAPK-y)