2 # Copyright (C) Felix Fietkau <nbd@nbd.name>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
15 PKG_MAINTAINER := Felix Fietkau <nbd@nbd.name>
16 PKG_BUILD_DEPENDS := fwtool/host
18 include $(INCLUDE_DIR)/package.mk
19 include $(INCLUDE_DIR)/host-build.mk
21 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
26 TITLE:=Utility for appending and extracting firmware metadata and signatures
30 $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $(HOST_BUILD_DIR)/fwtool ./src/fwtool.c
34 $(INSTALL_BIN) $(HOST_BUILD_DIR)/fwtool $(1)/bin/
38 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/fwtool ./src/fwtool.c
41 define Package/fwtool/install
42 $(INSTALL_DIR) $(1)/usr/bin
43 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fwtool $(1)/usr/bin/
46 $(eval $(call HostBuild))
47 $(eval $(call BuildPackage,fwtool))