summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 04cf60e..87c7038 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,7 +1,12 @@
+PKGDEPS := openssl
+
+ifeq ($(shell pkg-config --print-errors --exists $(PKGDEPS) || echo fail),fail)
+$(error Build dependencies are not met)
+endif
+
progs-y += apk
apk-objs := state.o database.o package.o archive.o \
- version.o io.o url.o gunzip.o blob.o \
- hash.o md5.o apk.o \
+ version.o io.o url.o gunzip.o blob.o hash.o apk.o \
add.o del.o update.o info.o search.o upgrade.o \
cache.o ver.o index.o fetch.o audit.o
CFLAGS_apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\"
@@ -11,7 +16,8 @@ apk.static-objs := $(apk-objs)
LDFLAGS_apk.static := -static
LDFLAGS_apk += -nopie
-LIBS := /usr/lib/libz.a
+LIBS += $(shell pkg-config --libs $(PKGDEPS))
+LIBS += /usr/lib/libz.a
install::
$(INSTALLDIR) $(DESTDIR)$(SBINDIR)