c7e1dfd6720cb3c5f891c339e7815cafd1c7731f
[openwrt/openwrt.git] / tools / mkimage / Makefile
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
9 PKG_NAME:=mkimage
10 PKG_VERSION:=2018.03
11
12 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
13 PKG_SOURCE_URL:=\
14 http://mirror2.openwrt.org/sources \
15 ftp://ftp.denx.de/pub/u-boot
16 PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
17
18 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/host-build.mk
21
22 define Host/Prepare
23 $(Host/Prepare/Default)
24 mkdir -p $(HOST_BUILD_DIR)/include/config
25 touch $(HOST_BUILD_DIR)/include/config/auto.conf
26 endef
27
28 define Host/Compile
29 $(MAKE) -C $(HOST_BUILD_DIR) \
30 HOSTCFLAGS="$(HOST_CFLAGS)" \
31 HOSTLDFLAGS="$(HOST_LDFLAGS)" \
32 no-dot-config-targets=tools-only \
33 CONFIG_FIT_SIGNATURE=y \
34 tools-only
35 endef
36
37 define Host/Install
38 $(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
39 $(CP) $(HOST_BUILD_DIR)/tools/mkenvimage $(STAGING_DIR_HOST)/bin/
40 endef
41
42 define Host/Clean
43 rm -f $(STAGING_DIR_HOST)/bin/mkimage
44 rm -f $(STAGING_DIR_HOST)/bin/mkenvimage
45 endef
46
47 $(eval $(call HostBuild))