Commit 9cd57a8f authored by Natanael Copa's avatar Natanael Copa

Makefile: make it possible to override pkg-config via PKG_CONFIG

parent 79b53d4d
PKGDEPS := openssl zlib PKGDEPS := openssl zlib
PKG_CONFIG ?= pkg-config
# lua module # lua module
ifneq ($(LUAAPK),) ifneq ($(LUAAPK),)
...@@ -13,7 +14,7 @@ install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) \ ...@@ -13,7 +14,7 @@ install-LUA_LIB-y := $(INSTALLDIR) $(DESTDIR)$(LUA_LIBDIR) \
$(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR) $(INSTALL) $(LUA_LIB-y) $(DESTDIR)$(LUA_LIBDIR)
endif 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) $(error Build dependencies are not met)
endif endif
...@@ -55,9 +56,9 @@ LDFLAGS_apk.static := -static ...@@ -55,9 +56,9 @@ LDFLAGS_apk.static := -static
LDFLAGS_apk += -nopie -L$(obj) LDFLAGS_apk += -nopie -L$(obj)
LDFLAGS_apk_test += -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 \ LIBS := -Wl,--as-needed \
$(shell pkg-config --libs $(PKGDEPS)) \ $(shell $(PKG_CONFIG) --libs $(PKGDEPS)) \
-Wl,--no-as-needed -Wl,--no-as-needed
$(obj)/apk: $(LIBAPK-y) $(obj)/apk: $(LIBAPK-y)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment