diff -Naur bzip2-1.0.3/Makefile bzip2-1.0.3-dynamic/Makefile --- bzip2-1.0.3/Makefile 2005-02-17 12:28:24.000000000 +0100 +++ bzip2-1.0.3-dynamic/Makefile 2005-05-26 17:35:15.000000000 +0200 @@ -8,10 +8,10 @@ LDFLAGS= BIGFILES=-D_FILE_OFFSET_BITS=64 -CFLAGS=-Wall -Winline -O -g $(BIGFILES) +CFLAGS=-Wall -Winline -O2 $(BIGFILES) # Where you want it installed when you do 'make install' -PREFIX=/usr +PREFIX=/usr/local OBJS= blocksort.o \ @@ -22,7 +22,7 @@ decompress.o \ bzlib.o -all: libbz2.a bzip2 bzip2recover test +all: libbz2.a libbz2.so bzip2 bzip2recover test bzip2: libbz2.a bzip2.o $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2 @@ -39,8 +39,15 @@ $(RANLIB) libbz2.a ; \ fi +libbz2.so: $(OBJS) + rm -f libbz2.so + $(CC) $(CFLAGS) -shared -o libbz2.so $(OBJS) + check: test -test: bzip2 +test: bzip2 libbz2.so + export LD_LIBRARY_PATH=$(PWD); make test-bootstrap + +test-bootstrap: @cat words1 ./bzip2 -1 < sample1.ref > sample1.rb2 ./bzip2 -2 < sample2.ref > sample2.rb2 @@ -56,7 +63,7 @@ cmp sample3.tst sample3.ref @cat words3 -install: bzip2 bzip2recover +install: bzip2 bzip2recover if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi @@ -76,15 +83,16 @@ chmod a+r $(PREFIX)/include/bzlib.h cp -f libbz2.a $(PREFIX)/lib chmod a+r $(PREFIX)/lib/libbz2.a + install -m 755 -o 0:0 libbz2.so $(PREFIX)/lib cp -f bzgrep $(PREFIX)/bin/bzgrep - ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep - ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep + ln -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep + ln -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep chmod a+x $(PREFIX)/bin/bzgrep cp -f bzmore $(PREFIX)/bin/bzmore - ln $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless + ln -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless chmod a+x $(PREFIX)/bin/bzmore cp -f bzdiff $(PREFIX)/bin/bzdiff - ln $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp + ln -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp chmod a+x $(PREFIX)/bin/bzdiff cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 chmod a+r $(PREFIX)/man/man1/bzgrep.1 @@ -96,7 +104,7 @@ echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 clean: - rm -f *.o libbz2.a bzip2 bzip2recover \ + rm -f *.o libbz2.a libbz2.so bzip2 bzip2recover \ sample1.rb2 sample2.rb2 sample3.rb2 \ sample1.tst sample2.tst sample3.tst diff -Naur bzip2-1.0.3/words3 bzip2-1.0.3-dynamic/words3 --- bzip2-1.0.3/words3 2004-10-09 13:29:33.000000000 +0200 +++ bzip2-1.0.3-dynamic/words3 2005-05-26 17:38:25.000000000 +0200 @@ -2,7 +2,8 @@ If you got this far and the "cmp"s didn't complain, it looks like you're in business. -To install in /usr/bin, /usr/lib, /usr/man and /usr/include, type +To install in /usr/local/bin, /usr/local/lib, /usr/local/man and +/usr/local/include, type make install To install somewhere else, eg, /xxx/yyy/{bin,lib,man,include}, type make install PREFIX=/xxx/yyy