Makefile 797 B

12345678910111213141516171819202122232425262728
  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. PKG_NAME:=patch-image
  9. include $(INCLUDE_DIR)/host-build.mk
  10. define Host/Compile
  11. $(HOSTCC) $(HOST_CFLAGS) -include endian.h $(HOST_STATIC_LINKING) -o $(HOST_BUILD_DIR)/patch-cmdline src/patch-cmdline.c
  12. $(HOSTCC) $(HOST_CFLAGS) -include endian.h $(HOST_STATIC_LINKING) -o $(HOST_BUILD_DIR)/patch-dtb src/patch-dtb.c
  13. endef
  14. define Host/Install
  15. $(CP) $(HOST_BUILD_DIR)/patch-cmdline $(STAGING_DIR_HOST)/bin/
  16. $(CP) $(HOST_BUILD_DIR)/patch-dtb $(STAGING_DIR_HOST)/bin/
  17. endef
  18. define Host/Clean
  19. rm -f $(STAGING_DIR_HOST)/bin/patch-cmdline
  20. rm -f $(STAGING_DIR_HOST)/bin/patch-dtb
  21. endef
  22. $(eval $(call HostBuild))