Add build time dependency xxd

Hi, package device-observatory needs a build time dependency on the tool xxd.
How can this be expressed in the package Makefile?

Adding PKG_BUILD_DEPENDS := xxd does not work, as package xxd does not seem to exist.
Any ideas?

You probably need a host package for the tool as well. See, for an example at random, tools/bc/Makefile

I've added a tools/xxd/Makefile, but it does not seem to be picked up by OpenWrt.
Makefile:

include $(TOPDIR)/rules.mk

PKG_NAME:=xxd
PKG_VERSION:=8.1
PKG_RELEASE:=1

PKG_SOURCE:=vim-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ftp.vim.org/pub/vim/unix
PKG_HASH:=8b69fbd01c877dd8ecbbeca1dc66e5e927228d631ac4c2174b9307eb5c827c86
PKG_MAINTAINER=Moritz Warning <moritzwarning@web.de>

include $(INCLUDE_DIR)/host-build.mk

define Host/Compile
	$(MAKE) -C $(STAGING_DIR_HOST)/src/xxd
endef

define Host/Install
	cp $(STAGING_DIR_HOST)/src/xxd/xxd $(STAGING_DIR_HOST)/bin/xxd
endef

$(eval $(call HostBuild))

Does anybody has an idea?

Build depends can only target packages, not tools.

@jow ok, how can I tell openwrt to try to compile my additional tool? I does not get compiled when I call make.

You need to define a package/xxd/Makefile with a HostBuild, then use PKG_BUILD_DEPENDS:=xxd/host

Use grep -r HostBuild package/ to find examples

There is already an xxd package as part of the vim package. I tried to add a host variant.
But so far it is not picked up by the build system:

Any hints are welcome.