busybox: keep syslog.conf during sysupgrade
[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_MKIMAGE_DTC_PATH=dtc \
34 CONFIG_FIT_SIGNATURE=y \
35 tools-only
36 endef
37
38 define Host/Install
39 $(CP) $(HOST_BUILD_DIR)/tools/mkimage $(STAGING_DIR_HOST)/bin/
40 $(CP) $(HOST_BUILD_DIR)/tools/mkenvimage $(STAGING_DIR_HOST)/bin/
41 endef
42
43 define Host/Clean
44 rm -f $(STAGING_DIR_HOST)/bin/mkimage
45 rm -f $(STAGING_DIR_HOST)/bin/mkenvimage
46 endef
47
48 $(eval $(call HostBuild))