From 977101ad5f833f5c0a574bfeea408e5301a6b052 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Sun, 23 Aug 1998 22:13:13 +0200 Subject: bzip2-0.9.0c --- Makefile | 52 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 18 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9d35b43..8ebea66 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,46 @@ -CC = gcc -SH = /bin/sh - -CFLAGS = -O3 -fomit-frame-pointer -funroll-loops - +CC=gcc +CFLAGS=-Wall -O2 -fomit-frame-pointer -fno-strength-reduce + +OBJS= blocksort.o \ + huffman.o \ + crctable.o \ + randtable.o \ + compress.o \ + decompress.o \ + bzlib.o + +all: lib bzip2 test + +bzip2: lib + $(CC) $(CFLAGS) -c bzip2.c + $(CC) $(CFLAGS) -o bzip2 bzip2.o -L. -lbz2 + $(CC) $(CFLAGS) -o bzip2recover bzip2recover.c +lib: $(OBJS) + rm -f libbz2.a + ar clq libbz2.a $(OBJS) -all: - cat words0 - $(CC) $(CFLAGS) -o bzip2 bzip2.c - $(CC) $(CFLAGS) -o bzip2recover bzip2recover.c - rm -f bunzip2 - ln -s ./bzip2 ./bunzip2 - cat words1 +test: bzip2 + @cat words1 ./bzip2 -1 < sample1.ref > sample1.rb2 ./bzip2 -2 < sample2.ref > sample2.rb2 - ./bunzip2 < sample1.bz2 > sample1.tst - ./bunzip2 < sample2.bz2 > sample2.tst - cat words2 + ./bzip2 -d < sample1.bz2 > sample1.tst + ./bzip2 -d < sample2.bz2 > sample2.tst + @cat words2 cmp sample1.bz2 sample1.rb2 cmp sample2.bz2 sample2.rb2 cmp sample1.tst sample1.ref cmp sample2.tst sample2.ref - cat words3 + @cat words3 + + +clean: + rm -f *.o libbz2.a bzip2 bzip2recover sample1.rb2 sample2.rb2 sample1.tst sample2.tst +.c.o: $*.o bzlib.h bzlib_private.h + $(CC) $(CFLAGS) -c $*.c -o $*.o -clean: - rm -f bzip2 bunzip2 bzip2recover sample*.tst sample*.rb2 +tarfile: + 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 -- cgit v1.2.3-55-g6feb