summaryrefslogtreecommitdiffstats
path: root/examples/Makefile
diff options
context:
space:
mode:
authoranjiahao <anjiahao@xiaomi.com>2022-01-15 11:12:26 (GMT)
committeranjiahao <anjiahao@xiaomi.com>2022-03-10 05:28:34 (GMT)
commitf5625f260e746ae97a68120cd5e46c1a8ac53505 (patch)
treef77c1129fa31a4a3d70a2a8fef4663513e5de3d6 /examples/Makefile
parent5b138c01b4644c133e556d96ad6105d24c401cac (diff)
downloadlz4-f5625f260e746ae97a68120cd5e46c1a8ac53505.zip
lz4-f5625f260e746ae97a68120cd5e46c1a8ac53505.tar.gz
lz4-f5625f260e746ae97a68120cd5e46c1a8ac53505.tar.bz2
add file operation and examples
operate lz4 compressed files as a general files Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/Makefile b/examples/Makefile
index a5af0c1..8be5c81 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -41,7 +41,7 @@ include ../Makefile.inc
default: all
all: printVersion doubleBuffer dictionaryRandomAccess ringBuffer ringBufferHC \
- lineCompress frameCompress simpleBuffer
+ lineCompress frameCompress fileCompress simpleBuffer
$(LZ4DIR)/liblz4.a: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c $(LZ4DIR)/lz4.h $(LZ4DIR)/lz4hc.h $(LZ4DIR)/lz4frame.h $(LZ4DIR)/lz4frame_static.h
$(MAKE) -C $(LZ4DIR) liblz4.a
@@ -67,6 +67,9 @@ lineCompress: blockStreaming_lineByLine.c $(LZ4DIR)/liblz4.a
frameCompress: frameCompress.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT)
+fileCompress: fileCompress.c $(LZ4DIR)/liblz4.a
+ $(CC) $(FLAGS) $^ -o $@$(EXT)
+
compressFunctions: compress_functions.c $(LZ4DIR)/liblz4.a
$(CC) $(FLAGS) $^ -o $@$(EXT) -lrt
@@ -94,6 +97,9 @@ test : all $(LZ4)
@echo "\n=== Frame compression ==="
./frameCompress$(EXT) $(TESTFILE)
$(LZ4) -vt $(TESTFILE).lz4
+ @echo "\n=== file compression ==="
+ ./fileCompress$(EXT) $(TESTFILE)
+ $(LZ4) -vt $(TESTFILE).lz4
.PHONY: cxxtest
cxxtest: CFLAGS := -O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror
@@ -104,5 +110,5 @@ clean:
@rm -f core *.o *.dec *-0 *-9 *-8192 *.lz4s *.lz4 \
printVersion$(EXT) doubleBuffer$(EXT) dictionaryRandomAccess$(EXT) \
ringBuffer$(EXT) ringBufferHC$(EXT) lineCompress$(EXT) frameCompress$(EXT) \
- compressFunctions$(EXT) simpleBuffer$(EXT)
+ fileCompress$(EXT) compressFunctions$(EXT) simpleBuffer$(EXT)
@echo Cleaning completed