Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #
  2. # Copyright (C) 2022 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=libdeflate
  8. PKG_VERSION:=1.18
  9. PKG_RELEASE:=1
  10. PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate.git
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  13. PKG_MIRROR_HASH:=015cbd33b1382b812f7c035640709186bc5d3d6a0ab177bffa7948f26f64edf9
  14. include $(INCLUDE_DIR)/host-build.mk
  15. define Host/Compile
  16. $(HOSTCC_NOCACHE) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
  17. $(HOST_BUILD_DIR)/lib/*{,/*}.c \
  18. $(HOST_BUILD_DIR)/programs/{gzip,prog_util,tgetopt}.c \
  19. -o $(HOST_BUILD_DIR)/libdeflate-gzip
  20. endef
  21. define Host/Install
  22. $(INSTALL_BIN) $(HOST_BUILD_DIR)/libdeflate-gzip $(STAGING_DIR_HOST)/bin/
  23. $(LN) libdeflate-gzip $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
  24. endef
  25. define Host/Uninstall
  26. $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gzip
  27. $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
  28. $(call Host/Uninstall/Default)
  29. endef
  30. $(eval $(call HostBuild))