summaryrefslogtreecommitdiffstats
path: root/pigz/Makefile
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-22 14:10:28 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-22 14:10:44 +0200
commit3bde123df8673b236fb554fac71d6d53cf67b629 (patch)
tree741d196bcb014cdafd100ebeff18895041b8b1a4 /pigz/Makefile
parentAdd progress bar support to backup and restore (diff)
downloadandroid_bootable_recovery-3bde123df8673b236fb554fac71d6d53cf67b629.tar
android_bootable_recovery-3bde123df8673b236fb554fac71d6d53cf67b629.tar.gz
android_bootable_recovery-3bde123df8673b236fb554fac71d6d53cf67b629.tar.bz2
android_bootable_recovery-3bde123df8673b236fb554fac71d6d53cf67b629.tar.lz
android_bootable_recovery-3bde123df8673b236fb554fac71d6d53cf67b629.tar.xz
android_bootable_recovery-3bde123df8673b236fb554fac71d6d53cf67b629.tar.zst
android_bootable_recovery-3bde123df8673b236fb554fac71d6d53cf67b629.zip
Diffstat (limited to 'pigz/Makefile')
-rw-r--r--pigz/Makefile33
1 files changed, 22 insertions, 11 deletions
diff --git a/pigz/Makefile b/pigz/Makefile
index fa47e2b13..822902c44 100644
--- a/pigz/Makefile
+++ b/pigz/Makefile
@@ -1,7 +1,8 @@
-CFLAGS=-O3
+CC=cc
+CFLAGS=-O3 -Wall -Wextra
pigz: pigz.o yarn.o
- cc -o pigz pigz.o yarn.o -lpthread -lz
+ $(CC) -o pigz pigz.o yarn.o -lpthread -lz
ln -f pigz unpigz
pigz.o: pigz.c yarn.h
@@ -11,19 +12,19 @@ yarn.o: yarn.c yarn.h
dev: pigz pigzt pigzn
pigzt: pigzt.o yarnt.o
- cc -o pigzt pigzt.o yarnt.o -lpthread -lz
+ $(CC) -o pigzt pigzt.o yarnt.o -lpthread -lz
pigzt.o: pigz.c yarn.h
- cc -Wall -O3 -DDEBUG -g -c -o pigzt.o pigz.c
+ $(CC) -Wall -O3 -DDEBUG -g -c -o pigzt.o pigz.c
yarnt.o: yarn.c yarn.h
- cc -Wall -O3 -DDEBUG -g -c -o yarnt.o yarn.c
+ $(CC) -Wall -O3 -DDEBUG -g -c -o yarnt.o yarn.c
pigzn: pigzn.o
- cc -o pigzn pigzn.o -lz
+ $(CC) -o pigzn pigzn.o -lz
pigzn.o: pigz.c
- cc -Wall -O3 -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
+ $(CC) -Wall -O3 -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
test: pigz
./pigz -kf pigz.c ; ./pigz -t pigz.c.gz
@@ -31,12 +32,22 @@ test: pigz
./pigz -kfp 1 pigz.c ; ./pigz -t pigz.c.gz
./pigz -kfz pigz.c ; ./pigz -t pigz.c.zz
./pigz -kfK pigz.c ; ./pigz -t pigz.c.zip
- compress -f < pigz.c | ./unpigz | cmp - pigz.c
- rm -f pigz.c.gz pigz.c.zz pigz.c.zip
+ printf "" | ./pigz -cdf | wc -c | test `cat` -eq 0
+ printf "x" | ./pigz -cdf | wc -c | test `cat` -eq 1
+ printf "xy" | ./pigz -cdf | wc -c | test `cat` -eq 2
+ printf "xyz" | ./pigz -cdf | wc -c | test `cat` -eq 3
+ (printf "w" | gzip ; printf "x") | ./pigz -cdf | wc -c | test `cat` -eq 2
+ (printf "w" | gzip ; printf "xy") | ./pigz -cdf | wc -c | test `cat` -eq 3
+ (printf "w" | gzip ; printf "xyz") | ./pigz -cdf | wc -c | test `cat` -eq 4
+ -@if test "`whereis compress | grep /`" != ""; then \
+ echo 'compress -f < pigz.c | ./unpigz | cmp - pigz.c' ;\
+ compress -f < pigz.c | ./unpigz | cmp - pigz.c ;\
+ fi
+ @rm -f pigz.c.gz pigz.c.zz pigz.c.zip
tests: dev test
./pigzn -kf pigz.c ; ./pigz -t pigz.c.gz
- rm -f pigz.c.gz
+ @rm -f pigz.c.gz
docs: pigz.pdf
@@ -44,4 +55,4 @@ pigz.pdf: pigz.1
groff -mandoc -f H -T ps pigz.1 | ps2pdf - pigz.pdf
clean:
- rm -f *.o pigz unpigz pigzn pigzt pigz.c.gz pigz.c.zz pigz.c.zip
+ @rm -f *.o pigz unpigz pigzn pigzt pigz.c.gz pigz.c.zz pigz.c.zip