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-03-09 21:46:59 (GMT)
committeryann.collet.73@gmail.com <yann.collet.73@gmail.com@650e7d94-2a16-8b24-b05c-7c0b3f6821cd>2012-03-09 21:46:59 (GMT)
commitad59ba1cfad62af37c44ded985fe1e2a0dffae05 (patch)
treef9001c58f8af4b5adcb53155443faa42e68a71fa /Makefile
parent89767cc28059fff5e782c4b8ddd5b0b03ddedb90 (diff)
downloadlz4-ad59ba1cfad62af37c44ded985fe1e2a0dffae05.zip
lz4-ad59ba1cfad62af37c44ded985fe1e2a0dffae05.tar.gz
lz4-ad59ba1cfad62af37c44ded985fe1e2a0dffae05.tar.bz2
minor code refactoring, mostly around __builtin_expect
git-svn-id: https://lz4.googlecode.com/svn/trunk@59 650e7d94-2a16-8b24-b05c-7c0b3f6821cd
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 076fd55..76f3163 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,20 @@
+OS := $(shell uname)
+
+ifeq ($(OS),Linux)
+ OUTPUT32 = lz4demo32
+ OUTPUT64 = lz4demo64
+else
+ OUTPUT32 = LZ4Demo32.exe
+ OUTPUT64 = LZ4Demo64.exe
+endif
+
all: lz4demo64 lz4demo32
lz4demo64: lz4.c lz4.h bench.c lz4demo.c
- gcc -O3 -I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration lz4.c bench.c lz4demo.c -o lz4demo64.exe
+ gcc -O3 -I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration lz4.c bench.c lz4demo.c -o $(OUTPUT64)
lz4demo32: lz4.c lz4.h bench.c lz4demo.c
- gcc -m32 -O3 -I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration lz4.c bench.c lz4demo.c -o lz4demo32.exe
+ gcc -m32 -O3 -I. -std=c99 -Wall -W -Wundef -Wno-implicit-function-declaration lz4.c bench.c lz4demo.c -o $(OUTPUT32)
clean:
- rm -f core *.o lz4demo32.exe lz4demo64.exe
+ rm -f core *.o $(OUTPUT32) $(OUTPUT64)