rename patch-cmdline and add code for patching DTB files into kernel images
[openwrt/openwrt.git] / tools / patch-image / Makefile
1 #
2 # Copyright (C) 2007-2012 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:=patch-image
10
11 include $(INCLUDE_DIR)/host-build.mk
12
13 define Host/Compile
14 $(HOSTCC) $(HOST_CFLAGS) -include endian.h $(HOST_STATIC_LINKING) -o $(HOST_BUILD_DIR)/patch-cmdline src/patch-cmdline.c
15 $(HOSTCC) $(HOST_CFLAGS) -include endian.h $(HOST_STATIC_LINKING) -o $(HOST_BUILD_DIR)/patch-dtb src/patch-dtb.c
16 endef
17
18 define Host/Install
19 $(CP) $(HOST_BUILD_DIR)/patch-cmdline $(STAGING_DIR_HOST)/bin/
20 $(CP) $(HOST_BUILD_DIR)/patch-dtb $(STAGING_DIR_HOST)/bin/
21 endef
22
23 define Host/Clean
24 rm -f $(STAGING_DIR_HOST)/bin/patch-cmdline
25 rm -f $(STAGING_DIR_HOST)/bin/patch-dtb
26 endef
27
28 $(eval $(call HostBuild))