2007-07-01 09:45:27 +00:00
|
|
|
#
|
2020-07-22 23:08:27 +00:00
|
|
|
# Copyright (C) 2007-2020 OpenWrt.org
|
2007-07-01 09:45:27 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2012-11-02 20:06:45 +00:00
|
|
|
PKG_NAME:=patch-image
|
2020-07-22 23:08:27 +00:00
|
|
|
PKG_RELEASE:=1
|
2007-07-01 09:45:27 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Compile
|
2015-02-06 00:00:43 +00:00
|
|
|
$(HOSTCC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/patch-cmdline src/patch-cmdline.c
|
|
|
|
$(HOSTCC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/patch-dtb src/patch-dtb.c
|
2007-07-01 09:45:27 +00:00
|
|
|
endef
|
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Install
|
|
|
|
$(CP) $(HOST_BUILD_DIR)/patch-cmdline $(STAGING_DIR_HOST)/bin/
|
2012-11-02 20:06:45 +00:00
|
|
|
$(CP) $(HOST_BUILD_DIR)/patch-dtb $(STAGING_DIR_HOST)/bin/
|
2007-07-01 09:45:27 +00:00
|
|
|
endef
|
|
|
|
|
2009-02-22 04:37:20 +00:00
|
|
|
define Host/Clean
|
2007-08-07 00:04:25 +00:00
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/patch-cmdline
|
2012-11-02 20:06:45 +00:00
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/patch-dtb
|
2007-07-01 09:45:27 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|