-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- lz4-1.9.4/programs/Makefile 2022-08-15 22:45:31.000000000 +0000 | ||
+++ - 2023-12-08 02:23:23.638015809 +0000 | ||
@@ -157,7 +157,7 @@ | ||
# directory variables : GNU conventions prefer lowercase | ||
# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html | ||
# support both lower and uppercase (BSD), use lowercase in script | ||
-PREFIX ?= /usr/local | ||
+PREFIX ?= ${COSMOS} | ||
prefix ?= $(PREFIX) | ||
EXEC_PREFIX ?= $(prefix) | ||
exec_prefix ?= $(EXEC_PREFIX) | ||
--- lz4-1.9.4/lib/Makefile 2022-08-15 22:45:31.000000000 +0000 | ||
+++ - 2023-12-08 02:24:29.553313505 +0000 | ||
@@ -43,7 +43,7 @@ | ||
LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT)) | ||
LIBVER := $(shell echo $(LIBVER_SCRIPT)) | ||
|
||
-BUILD_SHARED:=yes | ||
+BUILD_SHARED:=no | ||
BUILD_STATIC:=yes | ||
|
||
CPPFLAGS+= -DXXH_NAMESPACE=LZ4_ | ||
@@ -83,7 +83,7 @@ | ||
lib-release: lib | ||
|
||
.PHONY: lib | ||
-lib: liblz4.a liblz4 | ||
+lib: liblz4.a | ||
|
||
.PHONY: all | ||
all: lib | ||
@@ -151,7 +151,7 @@ | ||
# directory variables : GNU conventions prefer lowercase | ||
# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html | ||
# support both lower and uppercase (BSD), use lower in script | ||
-PREFIX ?= /usr/local | ||
+PREFIX ?= ${COSMOS} | ||
prefix ?= $(PREFIX) | ||
EXEC_PREFIX ?= $(prefix) | ||
exec_prefix ?= $(EXEC_PREFIX) | ||
--- lz4-1.9.4/Makefile 2022-08-15 22:45:31.000000000 +0000 | ||
+++ - 2023-12-08 02:27:13.319106238 +0000 | ||
@@ -54,13 +54,13 @@ | ||
.PHONY: lib lib-release liblz4.a | ||
lib: liblz4.a | ||
lib lib-release liblz4.a: | ||
- $(MAKE) -C $(LZ4DIR) $@ | ||
+ $(MAKE) -j$(MAXPROC) -C $(LZ4DIR) $@ | ||
|
||
.PHONY: lz4 lz4-release | ||
lz4 : liblz4.a | ||
lz4-release : lib-release | ||
lz4 lz4-release : | ||
- $(MAKE) -C $(PRGDIR) $@ | ||
+ $(MAKE) -j$(MAXPROC) -C $(PRGDIR) $@ | ||
cp $(PRGDIR)/lz4$(EXT) . | ||
|
||
.PHONY: examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# check for cosmo dirs | ||
if [ -z ${COSMO+x} ]; then | ||
echo "could not find COSMO source directory!"; | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${COSMOS+x} ]; then | ||
echo "could not find COSMOS install directory!"; | ||
exit 1 | ||
fi | ||
|
||
if [[ -f sources.tar.gz ]]; then | ||
# we already downloaded it | ||
cd lz4* | ||
make V=0 -s -i clean | ||
cd .. | ||
else | ||
# download the source code | ||
wget -q https://github.com/lz4/lz4/archive/refs/tags/v1.9.4.tar.gz -O sources.tar.gz | ||
tar -xf sources.tar.gz | ||
|
||
# apply patches if any | ||
patch -p0 -i minimal.diff | ||
fi | ||
|
||
# go into the source folder, configure | ||
cd lz4* | ||
|
||
# run make and/or make install | ||
make V=0 -s -j$MAXPROC | ||
make install V=0 -s -j$MAXPROC | ||
|
||
echo "DONE." |