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.cute-signatures
parent
bf094dc5ea
commit
b54ff5dd1e
|
@ -1,4 +1,4 @@
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue