diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-07-08 10:46:38 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-07-08 10:46:38 +0300 |
commit | b54ff5dd1ebc230aa50570ecfebc8fd31739ebb4 (patch) | |
tree | b6efe1b27a5ec5ae3c748af997d8d4f556d0c97a /src/Makefile | |
parent | bf094dc5ea30be1defb5c9f0d2064c6b2fc96272 (diff) | |
download | apk-tools-b54ff5dd1ebc230aa50570ecfebc8fd31739ebb4.tar.gz apk-tools-b54ff5dd1ebc230aa50570ecfebc8fd31739ebb4.tar.bz2 apk-tools-b54ff5dd1ebc230aa50570ecfebc8fd31739ebb4.tar.xz apk-tools-b54ff5dd1ebc230aa50570ecfebc8fd31739ebb4.zip |
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.
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile index 87c7038..0cd0774 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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) |