tools/libdeflate: update to 1.18
[openwrt/staging/jow.git] / tools / libdeflate / Makefile
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
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=libdeflate
10 PKG_VERSION:=1.18
11 PKG_RELEASE:=1
12
13 PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate.git
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
16 PKG_MIRROR_HASH:=015cbd33b1382b812f7c035640709186bc5d3d6a0ab177bffa7948f26f64edf9
17
18 include $(INCLUDE_DIR)/host-build.mk
19
20 define Host/Compile
21 $(HOSTCC_NOCACHE) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
22 $(HOST_BUILD_DIR)/lib/*{,/*}.c \
23 $(HOST_BUILD_DIR)/programs/{gzip,prog_util,tgetopt}.c \
24 -o $(HOST_BUILD_DIR)/libdeflate-gzip
25 endef
26
27 define Host/Install
28 $(INSTALL_BIN) $(HOST_BUILD_DIR)/libdeflate-gzip $(STAGING_DIR_HOST)/bin/
29 $(LN) libdeflate-gzip $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
30 endef
31
32 define Host/Uninstall
33 $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gzip
34 $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
35 $(call Host/Uninstall/Default)
36 endef
37
38 $(eval $(call HostBuild))