Commit b54ff5dd authored by Timo Teräs's avatar Timo Teräs

build: link zlib dynamically, use --as-needed

use pkgconfig of zlib instead of hard requiring it. and link in
the pkg-config libs with --as-needed as not all of the openssl
libs are really required.
parent bf094dc5
PKGDEPS := openssl
PKGDEPS := openssl zlib
ifeq ($(shell pkg-config --print-errors --exists $(PKGDEPS) || echo fail),fail)
$(error Build dependencies are not met)
......@@ -16,8 +16,10 @@ apk.static-objs := $(apk-objs)
LDFLAGS_apk.static := -static
LDFLAGS_apk += -nopie
LIBS += $(shell pkg-config --libs $(PKGDEPS))
LIBS += /usr/lib/libz.a
CFLAGS += $(shell pkg-config --cflags $(PKGDEPS))
LIBS := -Wl,--as-needed \
$(shell pkg-config --libs $(PKGDEPS)) \
-Wl,--no-as-needed
install::
$(INSTALLDIR) $(DESTDIR)$(SBINDIR)
......
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