2012-10-24 12:59:19 +00:00
|
|
|
CC=gcc
|
|
|
|
CFLAGS=-I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration
|
2012-03-09 21:46:59 +00:00
|
|
|
|
2012-10-24 12:59:19 +00:00
|
|
|
OS := $(shell uname)
|
2012-03-09 21:46:59 +00:00
|
|
|
ifeq ($(OS),Linux)
|
2012-10-24 12:59:19 +00:00
|
|
|
EXT =
|
2012-03-09 21:46:59 +00:00
|
|
|
else
|
2012-10-24 12:59:19 +00:00
|
|
|
EXT =.exe
|
2012-03-09 21:46:59 +00:00
|
|
|
endif
|
|
|
|
|
2013-04-13 09:31:22 +00:00
|
|
|
default: lz4c
|
2012-07-24 17:12:23 +00:00
|
|
|
|
2013-06-10 17:29:13 +00:00
|
|
|
all: lz4c lz4c32 fuzzer fullbench
|
2011-05-25 22:25:57 +00:00
|
|
|
|
2013-04-13 09:31:22 +00:00
|
|
|
lz4c: lz4.c lz4hc.c bench.c xxhash.c lz4c.c
|
2012-10-24 12:59:19 +00:00
|
|
|
$(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
|
2011-05-25 22:25:57 +00:00
|
|
|
|
2013-04-13 09:31:22 +00:00
|
|
|
lz4c32: lz4.c lz4hc.c bench.c xxhash.c lz4c.c
|
2012-10-24 12:59:19 +00:00
|
|
|
$(CC) -m32 -Os -march=native $(CFLAGS) $^ -o $@$(EXT)
|
2011-05-25 22:25:57 +00:00
|
|
|
|
2013-04-18 08:53:13 +00:00
|
|
|
fuzzer : lz4.c lz4hc.c fuzzer.c
|
2012-10-24 12:59:19 +00:00
|
|
|
$(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
|
|
|
|
|
2013-06-10 17:29:13 +00:00
|
|
|
fullbench : lz4.c lz4hc.c xxhash.c fullbench.c
|
|
|
|
$(CC) -O3 $(CFLAGS) $^ -o $@$(EXT)
|
|
|
|
|
2011-05-25 22:25:57 +00:00
|
|
|
clean:
|
2013-06-10 17:29:13 +00:00
|
|
|
rm -f core *.o lz4c$(EXT) lz4c32$(EXT) fuzzer$(EXT) fullbench$(EXT)
|