Makefile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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:=2014.10-librecmc
  10. PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
  11. PKG_SOURCE_URL:=\
  12. http://mirror2.openwrt.org/sources \
  13. ftp://ftp.denx.de/pub/u-boot
  14. PKG_MD5SUM:=a4d242902687a4ee46fe8dabb5c0f12e
  15. PKG_CAT:=bzcat
  16. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
  17. include $(INCLUDE_DIR)/host-build.mk
  18. define Host/Prepare
  19. $(Host/Prepare/Default)
  20. rm -f \
  21. $(HOST_BUILD_DIR)/include/errno.h \
  22. $(HOST_BUILD_DIR)/include/malloc.h \
  23. $(HOST_BUILD_DIR)/tools/.depend
  24. touch $(HOST_BUILD_DIR)/include/config.mk
  25. touch $(HOST_BUILD_DIR)/include/config.h
  26. endef
  27. define Host/Compile
  28. $(MAKE) -C $(HOST_BUILD_DIR) defconfig
  29. $(MAKE) -C $(HOST_BUILD_DIR) \
  30. HOSTLDFLAGS="$(HOST_STATIC_LINKING)" \
  31. tools-only
  32. endef
  33. define Host/Install
  34. $(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
  35. endef
  36. define Host/Clean
  37. rm -f $(STAGING_DIR_HOST)/bin/mkimage
  38. endef
  39. $(eval $(call HostBuild))