build: add a small standalone utility for calculating md5/sha256 hash
[openwrt/staging/lynxis/omap.git] / include / prereq-build.mk
index 29b6fbdaa692b9a55b517f2d1ef8381bab62b31e..496fc04f1b207402029182d8494d70e61c131e62 100644 (file)
@@ -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 && \