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.

include $(TOPDIR)/


PKG_MAINTAINER=Moritz Warning <>

include $(INCLUDE_DIR)/

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

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

$(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.