1 --- bzip2-1.0.6/Makefile.orig Wed Jan 12 13:53:06 2011 |
|
2 +++ bzip2-1.0.6/Makefile Thu Jan 13 13:01:30 2011 |
|
3 @@ -33,34 +33,33 @@ |
|
4 randtable.o \ |
|
5 compress.o \ |
|
6 decompress.o \ |
|
7 - bzlib.o |
|
8 + bzlib.o \ |
|
9 + oldapi.o |
|
10 |
|
11 -all: libbz2.a bzip2 bzip2recover test |
|
12 +all: libbz2.so bzip2 bzip2recover test |
|
13 |
|
14 -bzip2: libbz2.a bzip2.o |
|
15 +bzip2: libbz2.so bzip2.o |
|
16 $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2 |
|
17 |
|
18 bzip2recover: bzip2recover.o |
|
19 $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o |
|
20 |
|
21 -libbz2.a: $(OBJS) |
|
22 - rm -f libbz2.a |
|
23 - $(AR) cq libbz2.a $(OBJS) |
|
24 - @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \ |
|
25 - -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \ |
|
26 - echo $(RANLIB) libbz2.a ; \ |
|
27 - $(RANLIB) libbz2.a ; \ |
|
28 - fi |
|
29 +libbz2.so: $(OBJS) |
|
30 + rm -f libbz2.so libbz2.so.1 |
|
31 + $(CC) $(CFLAGS) -G -h libbz2.so.1 -o libbz2.so.1 \ |
|
32 + -z defs -z text -zcombreloc $(OBJS) -M ../../mapfile -L. \ |
|
33 + -lc |
|
34 + ln -s libbz2.so.1 libbz2.so |
|
35 |
|
36 check: test |
|
37 test: bzip2 |
|
38 @cat words1 |
|
39 - ./bzip2 -1 < sample1.ref > sample1.rb2 |
|
40 - ./bzip2 -2 < sample2.ref > sample2.rb2 |
|
41 - ./bzip2 -3 < sample3.ref > sample3.rb2 |
|
42 - ./bzip2 -d < sample1.bz2 > sample1.tst |
|
43 - ./bzip2 -d < sample2.bz2 > sample2.tst |
|
44 - ./bzip2 -ds < sample3.bz2 > sample3.tst |
|
45 + env LD_LIBRARY_PATH=. ./bzip2 -1 < sample1.ref > sample1.rb2 |
|
46 + env LD_LIBRARY_PATH=. ./bzip2 -2 < sample2.ref > sample2.rb2 |
|
47 + env LD_LIBRARY_PATH=. ./bzip2 -3 < sample3.ref > sample3.rb2 |
|
48 + env LD_LIBRARY_PATH=. ./bzip2 -d < sample1.bz2 > sample1.tst |
|
49 + env LD_LIBRARY_PATH=. ./bzip2 -d < sample2.bz2 > sample2.tst |
|
50 + env LD_LIBRARY_PATH=. ./bzip2 -ds < sample3.bz2 > sample3.tst |
|
51 cmp sample1.bz2 sample1.rb2 |
|
52 cmp sample2.bz2 sample2.rb2 |
|
53 cmp sample3.bz2 sample3.rb2 |
|
54 @@ -72,8 +71,8 @@ |
|
55 install: bzip2 bzip2recover |
|
56 if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi |
|
57 if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi |
|
58 - if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi |
|
59 - if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi |
|
60 + if ( test ! -d $(PREFIX)/share/man ) ; then mkdir -p $(PREFIX)/share/man ; fi |
|
61 + if ( test ! -d $(PREFIX)/share/man/man1 ) ; then mkdir -p $(PREFIX)/share/man/man1 ; fi |
|
62 if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi |
|
63 cp -f bzip2 $(PREFIX)/bin/bzip2 |
|
64 cp -f bzip2 $(PREFIX)/bin/bunzip2 |
|
65 @@ -83,30 +82,28 @@ |
|
66 chmod a+x $(PREFIX)/bin/bunzip2 |
|
67 chmod a+x $(PREFIX)/bin/bzcat |
|
68 chmod a+x $(PREFIX)/bin/bzip2recover |
|
69 - cp -f bzip2.1 $(PREFIX)/man/man1 |
|
70 - chmod a+r $(PREFIX)/man/man1/bzip2.1 |
|
71 + cp -f bzip2.1 $(PREFIX)/share/man/man1 |
|
72 + chmod a+r $(PREFIX)/share/man/man1/bzip2.1 |
|
73 cp -f bzlib.h $(PREFIX)/include |
|
74 chmod a+r $(PREFIX)/include/bzlib.h |
|
75 - cp -f libbz2.a $(PREFIX)/lib |
|
76 - chmod a+r $(PREFIX)/lib/libbz2.a |
|
77 cp -f bzgrep $(PREFIX)/bin/bzgrep |
|
78 - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep |
|
79 - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep |
|
80 + ln -s -f ./bzgrep $(PREFIX)/bin/bzegrep |
|
81 + ln -s -f ./bzgrep $(PREFIX)/bin/bzfgrep |
|
82 chmod a+x $(PREFIX)/bin/bzgrep |
|
83 cp -f bzmore $(PREFIX)/bin/bzmore |
|
84 - ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless |
|
85 + ln -s -f ./bzmore $(PREFIX)/bin/bzless |
|
86 chmod a+x $(PREFIX)/bin/bzmore |
|
87 cp -f bzdiff $(PREFIX)/bin/bzdiff |
|
88 - ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp |
|
89 + ln -s -f ./bzdiff $(PREFIX)/bin/bzcmp |
|
90 chmod a+x $(PREFIX)/bin/bzdiff |
|
91 - cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 |
|
92 - chmod a+r $(PREFIX)/man/man1/bzgrep.1 |
|
93 - chmod a+r $(PREFIX)/man/man1/bzmore.1 |
|
94 - chmod a+r $(PREFIX)/man/man1/bzdiff.1 |
|
95 - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1 |
|
96 - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1 |
|
97 - echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1 |
|
98 - echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 |
|
99 + cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/share/man/man1 |
|
100 + chmod a+r $(PREFIX)/share/man/man1/bzgrep.1 |
|
101 + chmod a+r $(PREFIX)/share/man/man1/bzmore.1 |
|
102 + chmod a+r $(PREFIX)/share/man/man1/bzdiff.1 |
|
103 + echo ".so man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzegrep.1 |
|
104 + echo ".so man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzfgrep.1 |
|
105 + echo ".so man1/bzmore.1" > $(PREFIX)/share/man/man1/bzless.1 |
|
106 + echo ".so man1/bzdiff.1" > $(PREFIX)/share/man/man1/bzcmp.1 |
|
107 |
|
108 clean: |
|
109 rm -f *.o libbz2.a bzip2 bzip2recover \ |
|
110 @@ -132,6 +129,8 @@ |
|
111 $(CC) $(CFLAGS) -c bzip2.c |
|
112 bzip2recover.o: bzip2recover.c |
|
113 $(CC) $(CFLAGS) -c bzip2recover.c |
|
114 +oldapi.o: oldapi.c |
|
115 + $(CC) $(CFLAGS) -c oldapi.c |
|
116 |
|
117 |
|
118 distclean: clean |
|