1
0

Makefile 766 B

1234567891011121314151617181920212223242526272829
  1. #
  2. # Copyright (C) 2007-2020 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. PKG_RELEASE:=1
  10. include $(INCLUDE_DIR)/host-build.mk
  11. define Host/Compile
  12. $(HOSTCC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/patch-cmdline src/patch-cmdline.c
  13. $(HOSTCC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/patch-dtb src/patch-dtb.c
  14. endef
  15. define Host/Install
  16. $(CP) $(HOST_BUILD_DIR)/patch-cmdline $(STAGING_DIR_HOST)/bin/
  17. $(CP) $(HOST_BUILD_DIR)/patch-dtb $(STAGING_DIR_HOST)/bin/
  18. endef
  19. define Host/Clean
  20. rm -f $(STAGING_DIR_HOST)/bin/patch-cmdline
  21. rm -f $(STAGING_DIR_HOST)/bin/patch-dtb
  22. endef
  23. $(eval $(call HostBuild))