Ticket #11272: patch-Makefile-so.diff
File patch-Makefile-so.diff, 2.2 KB (added by pipping@…, 18 years ago) |
---|
-
Makefile
old new 21 21 LDFLAGS= 22 22 23 23 BIGFILES=-D_FILE_OFFSET_BITS=64 24 CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)24 CFLAGS=-Wall -Winline -O2 -g -fPIC -fpic $(BIGFILES) 25 25 26 26 # Where you want it installed when you do 'make install' 27 27 PREFIX=/usr/local … … 35 35 decompress.o \ 36 36 bzlib.o 37 37 38 all: libbz2.a bzip2 bzip2recover test38 all: libbz2.a libbz2.so.1.0.2 bzip2 bzip2recover test 39 39 40 40 bzip2: libbz2.a bzip2.o 41 41 $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2 … … 52 52 $(RANLIB) libbz2.a ; \ 53 53 fi 54 54 55 libbz2.so.1.0.2: $(OBJS) 56 rm -f libbz2.so 57 $(CC) -shared -o libbz2.so.1.0.2 $(OBJS) 58 55 59 check: test 56 60 test: bzip2 57 61 @cat words1 58 ./bzip2 -1 < sample1.ref > sample1.rb259 ./bzip2 -2 < sample2.ref > sample2.rb260 ./bzip2 -3 < sample3.ref > sample3.rb261 ./bzip2 -d < sample1.bz2 > sample1.tst62 ./bzip2 -d < sample2.bz2 > sample2.tst63 ./bzip2 -ds < sample3.bz2 > sample3.tst62 LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):. ./bzip2 -1 < sample1.ref > sample1.rb2 63 LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):. ./bzip2 -2 < sample2.ref > sample2.rb2 64 LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):. ./bzip2 -3 < sample3.ref > sample3.rb2 65 LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):. ./bzip2 -d < sample1.bz2 > sample1.tst 66 LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):. ./bzip2 -d < sample2.bz2 > sample2.tst 67 LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):. ./bzip2 -ds < sample3.bz2 > sample3.tst 64 68 cmp sample1.bz2 sample1.rb2 65 69 cmp sample2.bz2 sample2.rb2 66 70 cmp sample3.bz2 sample3.rb2 … … 89 93 chmod a+r $(PREFIX)/include/bzlib.h 90 94 cp -f libbz2.a $(PREFIX)/lib 91 95 chmod a+r $(PREFIX)/lib/libbz2.a 96 cp -f libbz2.so.1.0.2 $(PREFIX)/lib 97 chmod a+r $(PREFIX)/lib/libbz2.so.1.0.2 98 ln -s libbz2.so.1.0.2 $(PREFIX)/lib/libbz2.so.1 99 ln -s libbz2.so.1.0.2 $(PREFIX)/lib/libbz2.so 92 100 cp -f bzgrep $(PREFIX)/bin/bzgrep 93 101 ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep 94 102 ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep … … 109 117 echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 110 118 111 119 clean: 112 rm -f *.o libbz2.a bzip2 bzip2recover \120 rm -f *.o libbz2.a libbz2.so.1.0.2 bzip2 bzip2recover \ 113 121 sample1.rb2 sample2.rb2 sample3.rb2 \ 114 122 sample1.tst sample2.tst sample3.tst 115 123