2007-07-01 12:45:27 +03:00
|
|
|
#
|
2012-08-10 22:26:45 +03:00
|
|
|
# Copyright (C) 2007-2012 OpenWrt.org
|
2007-07-01 12:45:27 +03: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 22:06:45 +02:00
|
|
|
PKG_NAME:=patch-image
|
2007-07-01 12:45:27 +03:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
|
2009-02-22 06:37:20 +02:00
|
|
|
define Host/Compile
|
2012-11-02 22:06:45 +02:00
|
|
|
$(HOSTCC) $(HOST_CFLAGS) -include endian.h $(HOST_STATIC_LINKING) -o $(HOST_BUILD_DIR)/patch-cmdline src/patch-cmdline.c
|
|
|
|
$(HOSTCC) $(HOST_CFLAGS) -include endian.h $(HOST_STATIC_LINKING) -o $(HOST_BUILD_DIR)/patch-dtb src/patch-dtb.c
|
2007-07-01 12:45:27 +03:00
|
|
|
endef
|
|
|
|
|
2009-02-22 06:37:20 +02:00
|
|
|
define Host/Install
|
|
|
|
$(CP) $(HOST_BUILD_DIR)/patch-cmdline $(STAGING_DIR_HOST)/bin/
|
2012-11-02 22:06:45 +02:00
|
|
|
$(CP) $(HOST_BUILD_DIR)/patch-dtb $(STAGING_DIR_HOST)/bin/
|
2007-07-01 12:45:27 +03:00
|
|
|
endef
|
|
|
|
|
2009-02-22 06:37:20 +02:00
|
|
|
define Host/Clean
|
2007-08-07 03:04:25 +03:00
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/patch-cmdline
|
2012-11-02 22:06:45 +02:00
|
|
|
rm -f $(STAGING_DIR_HOST)/bin/patch-dtb
|
2007-07-01 12:45:27 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|