summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-08 16:25:35 +0800
committerruki <[email protected]>2022-05-08 16:25:35 +0800
commit97bdd6ab5753cf929e6d21a6d5a1ff33c145891b (patch)
treeae28e4d34980e84ecce9f89dce49f7aa6ad63381
parent2867db004c5bbcbf1970a6c99acbe74c85c2ca41 (diff)
add lz4 makefile
-rw-r--r--NOTICE.md8
-rw-r--r--core/src/lz4/makefile28
-rw-r--r--core/src/makefile2
3 files changed, 37 insertions, 1 deletions
diff --git a/NOTICE.md b/NOTICE.md
index 8a85b751e..0e9d41b59 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -53,6 +53,14 @@ which can be obtained at:
* HOMEPAGE:
* http://lua.org/
+This product depends on 'lz4', Extremely Fast Compression algorithm,
+which can be obtained at:
+
+ * LICENSE:
+ * https://github.com/lz4/lz4/blob/dev/LICENSE
+ * HOMEPAGE:
+ * https://www.lz4.org/
+
This product depends on 'tbox', The Treasure Box Library,
which can be obtained at:
diff --git a/core/src/lz4/makefile b/core/src/lz4/makefile
new file mode 100644
index 000000000..ee5c1c770
--- /dev/null
+++ b/core/src/lz4/makefile
@@ -0,0 +1,28 @@
+# prefix
+include $(PRO_DIR)/prefix.mak
+
+# module name
+NAMES = lz4
+
+# module type
+lz4_TYPE = LIB
+
+# config
+lz4_CONFIG = n
+
+# core files
+lz4_C_FILES += \
+ lz4/lib/lz4 \
+ lz4/lib/lz4frame \
+ lz4/lib/lz4hc \
+ lz4/lib/xxhash
+
+# use given system library?
+lz4_C_FILES := $(if $(findstring lz4,$(base_LIBNAMES)),,$(lz4_C_FILES))
+lz4_ASM_FILES := $(if $(findstring lz4,$(base_LIBNAMES)),,$(lz4_ASM_FILES))
+lz4_INC_FILES := $(if $(findstring lz4,$(base_LIBNAMES)),,$(lz4_INC_FILES))
+lz4_OBJ_FILES := $(if $(findstring lz4,$(base_LIBNAMES)),,$(lz4_OBJ_FILES))
+
+# suffix
+include $(PRO_DIR)/suffix.mak
+
diff --git a/core/src/makefile b/core/src/makefile
index f16a1557d..007c6f6ab 100644
--- a/core/src/makefile
+++ b/core/src/makefile
@@ -9,7 +9,7 @@ endif
ifeq ($(RUNTIME),lua)
DEP_PROS += lua
endif
-DEP_PROS += lcurses sv lua-cjson tbox xmake
+DEP_PROS += lcurses sv lua-cjson lz4 tbox xmake
# suffix
include $(PRO_DIR)/suffix.mak