summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authoryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2012-10-24 12:59:19 (GMT)
committeryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2012-10-24 12:59:19 (GMT)
commitb1e707f77277441feae978f501ac3455e8bc9b25 (patch)
tree2173b61747ec89799d7bf8176bd5ba591d7409fc /Makefile
parent66be4025df5d1e746161e77d6ab394e646c6b682 (diff)
downloadlz4-b1e707f77277441feae978f501ac3455e8bc9b25.zip
lz4-b1e707f77277441feae978f501ac3455e8bc9b25.tar.gz
lz4-b1e707f77277441feae978f501ac3455e8bc9b25.tar.bz2
- Corrected issue 31 : LZ4 correctly accepts compressing data when the output buffer has exactly the required size (it was a bit over-cautious in previous version).
- Added : a fuzzer tool Thanks to Andrew Mahone, for contribution on both points git-svn-id: https://lz4.googlecode.com/svn/trunk@79 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index dbefc12..eca9966 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,25 @@
-OS := $(shell uname)
+CC=gcc
+CFLAGS=-I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration
+OS := $(shell uname)
ifeq ($(OS),Linux)
- OUTPUT32 = lz4demo32
- OUTPUT = lz4demo
+EXT =
else
- OUTPUT32 = LZ4Demo32.exe
- OUTPUT = LZ4Demo.exe
+EXT =.exe
endif
default: lz4demo
-all: lz4demo lz4demo32
+all: lz4demo lz4demo32 fuzzer
-lz4demo: lz4.c lz4.h lz4hc.c lz4hc.h bench.c lz4demo.c
- gcc -O3 -I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration lz4hc.c lz4.c bench.c lz4demo.c -o $(OUTPUT)
+lz4demo: lz4.c lz4hc.c bench.c lz4demo.c
+ $(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
-lz4demo32: lz4.c lz4.h lz4hc.c lz4hc.h bench.c lz4demo.c
- gcc -m32 -Os -march=native -I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration lz4hc.c lz4.c bench.c lz4demo.c -o $(OUTPUT32)
+lz4demo32: lz4.c lz4hc.c bench.c lz4demo.c
+ $(CC) -m32 -Os -march=native $(CFLAGS) $^ -o $@$(EXT)
+fuzzer : lz4.c fuzzer.c
+ $(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
+
clean:
- rm -f core *.o $(OUTPUT32) $(OUTPUT)
+ rm -f core *.o lz4demo$(EXT) lz4demo32$(EXT) fuzzer$(EXT)