2
0

Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #
  2. # Copyright (C) Felix Fietkau <nbd@nbd.name>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=fwtool
  9. PKG_RELEASE:=1
  10. PKG_FLAGS:=nonshared
  11. PKG_MAINTAINER := Felix Fietkau <nbd@nbd.name>
  12. PKG_BUILD_DEPENDS := fwtool/host
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/host-build.mk
  15. HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
  16. define Package/fwtool
  17. SECTION:=utils
  18. CATEGORY:=Base system
  19. TITLE:=Utility for appending and extracting firmware metadata and signatures
  20. endef
  21. define Host/Compile
  22. $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $(HOST_BUILD_DIR)/fwtool ./src/fwtool.c
  23. endef
  24. define Host/Install
  25. $(INSTALL_BIN) $(HOST_BUILD_DIR)/fwtool $(1)/bin/
  26. endef
  27. define Build/Compile
  28. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/fwtool ./src/fwtool.c
  29. endef
  30. define Package/fwtool/install
  31. $(INSTALL_DIR) $(1)/usr/bin
  32. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fwtool $(1)/usr/bin/
  33. endef
  34. $(eval $(call HostBuild))
  35. $(eval $(call BuildPackage,fwtool))