2
0

Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. https://librecmc.org/librecmc/downloads/sources/v1.4/
  13. PKG_HASH:=e74e658ef6b09ad1b682f5d1651f9ab1755bb3523c5261c6176d212341f7962d
  14. PKG_CAT:=bzcat
  15. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
  16. include $(INCLUDE_DIR)/host-build.mk
  17. define Host/Prepare
  18. $(Host/Prepare/Default)
  19. rm -f \
  20. $(HOST_BUILD_DIR)/include/errno.h \
  21. $(HOST_BUILD_DIR)/include/malloc.h \
  22. $(HOST_BUILD_DIR)/tools/.depend
  23. touch $(HOST_BUILD_DIR)/include/config.mk
  24. touch $(HOST_BUILD_DIR)/include/config.h
  25. endef
  26. define Host/Compile
  27. $(MAKE) -C $(HOST_BUILD_DIR) defconfig HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)"
  28. $(MAKE) -C $(HOST_BUILD_DIR) tools-only HOSTCFLAGS="$(HOST_CPPFLAGS) $(HOST_CFLAGS)" HOSTLDFLAGS="$(HOST_LDFLAGS)" HOST_LOADLIBES="$$$$(pkg-config --static --libs libcrypto)"
  29. endef
  30. define Host/Install
  31. $(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
  32. endef
  33. define Host/Clean
  34. rm -f $(STAGING_DIR_HOST)/bin/mkimage
  35. endef
  36. $(eval $(call HostBuild))