diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 52 |
1 files changed, 34 insertions, 18 deletions
| @@ -1,30 +1,46 @@ | |||
| 1 | 1 | ||
| 2 | CC = gcc | 2 | CC=gcc |
| 3 | SH = /bin/sh | 3 | CFLAGS=-Wall -O2 -fomit-frame-pointer -fno-strength-reduce |
| 4 | 4 | ||
| 5 | CFLAGS = -O3 -fomit-frame-pointer -funroll-loops | 5 | OBJS= blocksort.o \ |
| 6 | 6 | huffman.o \ | |
| 7 | crctable.o \ | ||
| 8 | randtable.o \ | ||
| 9 | compress.o \ | ||
| 10 | decompress.o \ | ||
| 11 | bzlib.o | ||
| 12 | |||
| 13 | all: lib bzip2 test | ||
| 14 | |||
| 15 | bzip2: lib | ||
| 16 | $(CC) $(CFLAGS) -c bzip2.c | ||
| 17 | $(CC) $(CFLAGS) -o bzip2 bzip2.o -L. -lbz2 | ||
| 18 | $(CC) $(CFLAGS) -o bzip2recover bzip2recover.c | ||
| 7 | 19 | ||
| 20 | lib: $(OBJS) | ||
| 21 | rm -f libbz2.a | ||
| 22 | ar clq libbz2.a $(OBJS) | ||
| 8 | 23 | ||
| 9 | all: | 24 | test: bzip2 |
| 10 | cat words0 | 25 | @cat words1 |
| 11 | $(CC) $(CFLAGS) -o bzip2 bzip2.c | ||
| 12 | $(CC) $(CFLAGS) -o bzip2recover bzip2recover.c | ||
| 13 | rm -f bunzip2 | ||
| 14 | ln -s ./bzip2 ./bunzip2 | ||
| 15 | cat words1 | ||
| 16 | ./bzip2 -1 < sample1.ref > sample1.rb2 | 26 | ./bzip2 -1 < sample1.ref > sample1.rb2 |
| 17 | ./bzip2 -2 < sample2.ref > sample2.rb2 | 27 | ./bzip2 -2 < sample2.ref > sample2.rb2 |
| 18 | ./bunzip2 < sample1.bz2 > sample1.tst | 28 | ./bzip2 -d < sample1.bz2 > sample1.tst |
| 19 | ./bunzip2 < sample2.bz2 > sample2.tst | 29 | ./bzip2 -d < sample2.bz2 > sample2.tst |
| 20 | cat words2 | 30 | @cat words2 |
| 21 | cmp sample1.bz2 sample1.rb2 | 31 | cmp sample1.bz2 sample1.rb2 |
| 22 | cmp sample2.bz2 sample2.rb2 | 32 | cmp sample2.bz2 sample2.rb2 |
| 23 | cmp sample1.tst sample1.ref | 33 | cmp sample1.tst sample1.ref |
| 24 | cmp sample2.tst sample2.ref | 34 | cmp sample2.tst sample2.ref |
| 25 | cat words3 | 35 | @cat words3 |
| 36 | |||
| 37 | |||
| 38 | clean: | ||
| 39 | rm -f *.o libbz2.a bzip2 bzip2recover sample1.rb2 sample2.rb2 sample1.tst sample2.tst | ||
| 26 | 40 | ||
| 41 | .c.o: $*.o bzlib.h bzlib_private.h | ||
| 42 | $(CC) $(CFLAGS) -c $*.c -o $*.o | ||
| 27 | 43 | ||
| 28 | clean: | 44 | tarfile: |
| 29 | rm -f bzip2 bunzip2 bzip2recover sample*.tst sample*.rb2 | 45 | tar cvf interim.tar *.c *.h Makefile manual.texi manual.ps LICENSE bzip2.1 bzip2.1.preformatted bzip2.txt words1 words2 words3 sample1.ref sample2.ref sample1.bz2 sample2.bz2 *.html README CHANGES libbz2.def libbz2.dsp dlltest.dsp |
| 30 | 46 | ||
