aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lz4/Makefile
diff options
context:
space:
mode:
authorTony Butler <spudz76@gmail.com>2022-11-28 16:01:26 -0800
committerDaniel Golle <daniel@makrotopia.org>2023-01-16 23:51:10 +0000
commit8b12966d20bf10316752b3678d3999f83e564c60 (patch)
treeec1786d1a7c0126ae3f9bdc1be3b4c706c8c29f0 /tools/lz4/Makefile
parent539b52068a079801fe0955f7cf5f39e536a08803 (diff)
downloadupstream-8b12966d20bf10316752b3678d3999f83e564c60.tar.gz
upstream-8b12966d20bf10316752b3678d3999f83e564c60.tar.bz2
upstream-8b12966d20bf10316752b3678d3999f83e564c60.zip
tools/lz4: add `lz4` binaries
same as `packages/liblz4` modified to be a HOST/tools type build with unified liblz4 (this is also the dev package for liblz4) the image initramfs generator offers the LZ4 option but there was no executable to support it actually working Signed-off-by: Tony Butler <spudz76@gmail.com>
Diffstat (limited to 'tools/lz4/Makefile')
-rw-r--r--tools/lz4/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/tools/lz4/Makefile b/tools/lz4/Makefile
new file mode 100644
index 0000000000..c5d4f6f16b
--- /dev/null
+++ b/tools/lz4/Makefile
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2022 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=lz4
+PKG_VERSION:=1.9.4
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b
+
+PKG_LICENSE:=BSD-2-Clause
+PKG_LICENSE_FILES:=LICENSE lib/LICENSE
+
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+# Always optimize for speed
+HOST_CFLAGS := $(filter-out -O%,$(HOST_CFLAGS)) -O3
+
+HOST_MAKE_FLAGS+=PREFIX=$(HOST_BUILD_PREFIX) \
+ ENABLE_DOCS=1
+
+define Host/Configure
+endef
+
+define Host/Compile
+ $(call Host/Compile/Default,default)
+endef
+
+define Host/Install
+ $(call Host/Compile/Default,install)
+endef
+
+define Host/Uninstall
+ $(call Host/Compile/Default,uninstall)
+ $(call Host/Compile/Default,clean)
+endef
+
+define Host/Clean
+endef
+
+$(eval $(call HostBuild))