summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-07-08 09:50:21 +0300
committerTimo Teras <timo.teras@iki.fi>2009-07-08 10:45:49 +0300
commitbf094dc5ea30be1defb5c9f0d2064c6b2fc96272 (patch)
tree34be7a9326397d6b408a8f59dd61f8e6ea4bc238 /src/Makefile
parentc84196e0d367d8e82e5a3161394741f86bc32750 (diff)
downloadapk-tools-bf094dc5ea30be1defb5c9f0d2064c6b2fc96272.tar.gz
apk-tools-bf094dc5ea30be1defb5c9f0d2064c6b2fc96272.tar.bz2
apk-tools-bf094dc5ea30be1defb5c9f0d2064c6b2fc96272.tar.xz
apk-tools-bf094dc5ea30be1defb5c9f0d2064c6b2fc96272.zip
csum: use openssl instead
instead of having static md5 implemenation, use the openssl library for digest functions.
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)