From dad48c6438f0a4c42ad34842a88e82280d971d90 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 25 Dec 2016 16:23:34 +0100 Subject: build: add a small standalone utility for calculating md5/sha256 hash This will be used to simplify the build system code for checking hashes. Instead of using various variants of md5sum / openssl, use one simple utility for all of them Signed-off-by: Felix Fietkau --- include/prereq-build.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/prereq-build.mk') diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 29b6fbdaa6..496fc04f1b 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -156,6 +156,12 @@ $(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \ file --version 2>&1 | grep file)) +$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c + mkdir -p $(dir $@) + $(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $< + +prereq: $(STAGING_DIR_HOST)/bin/mkhash + # Install ldconfig stub $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \ touch $(STAGING_DIR_HOST)/bin/ldconfig && \ -- cgit v1.2.3