Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  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:=mkimage
  9. PKG_VERSION:=2023.04
  10. PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
  11. PKG_SOURCE_URL:= \
  12. https://mirror.cyberbits.eu/u-boot \
  13. https://ftp.denx.de/pub/u-boot \
  14. ftp://ftp.denx.de/pub/u-boot
  15. PKG_HASH:=e31cac91545ff41b71cec5d8c22afd695645cd6e2a442ccdacacd60534069341
  16. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
  17. include $(INCLUDE_DIR)/host-build.mk
  18. define Host/Configure
  19. $(MAKE) -C $(HOST_BUILD_DIR) \
  20. HOSTCFLAGS="$(HOST_CFLAGS)" \
  21. HOSTLDFLAGS="$(HOST_LDFLAGS)" \
  22. PKG_CONFIG_EXTRAARGS="--static" \
  23. V=$(if $(findstring c,$(LIBRECMC_VERBOSE)),1) \
  24. tools-only_config
  25. sed -i 's/CONFIG_TOOLS_MKEFICAPSULE=y/# CONFIG_TOOLS_MKEFICAPSULE is not set/' $(HOST_BUILD_DIR)/.config
  26. endef
  27. define Host/Compile
  28. $(MAKE) -C $(HOST_BUILD_DIR) \
  29. HOSTCFLAGS="$(HOST_CFLAGS)" \
  30. HOSTLDFLAGS="$(HOST_LDFLAGS)" \
  31. PKG_CONFIG_EXTRAARGS="--static" \
  32. V=$(if $(findstring c,$(LIBRECMC_VERBOSE)),1) \
  33. tools-only
  34. endef
  35. define Host/Install
  36. $(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
  37. $(CP) $(HOST_BUILD_DIR)/tools/mkenvimage $(STAGING_DIR_HOST)/bin/
  38. endef
  39. define Host/Clean
  40. rm -f $(STAGING_DIR_HOST)/bin/mkimage
  41. rm -f $(STAGING_DIR_HOST)/bin/mkenvimage
  42. endef
  43. $(eval $(call HostBuild))