Ticket #436: patch-Makefile

File patch-Makefile, 2.6 KB (added by ssen@…, 21 years ago)

new patch-Makefile

Line 
1--- Makefile.orig       Mon Mar 31 16:21:11 2003
2+++ Makefile    Mon Mar 31 16:23:57 2003
3@@ -23,7 +23,7 @@
4       decompress.o \
5       bzlib.o
6 
7-all: libbz2.a bzip2 bzip2recover test
8+all: libbz2.a libbz2.dylib bzip2 bzip2recover test
9 
10 bzip2: libbz2.a bzip2.o
11        $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
12@@ -40,15 +40,24 @@
13                $(RANLIB) libbz2.a ; \
14        fi
15 
16+libbz2.dylib: $(OBJS)
17+       rm -f libbz2.dylib
18+       libtool -dynamic $(OBJS) -lSystem -o libbz2.1.0.2.dylib \
19+               -install_name $(PREFIX)/lib/libbz2.1.0.dylib \
20+               -compatibility_version 1.0 -current_version 1.0.2
21+       ln -s libbz2.1.0.2.dylib libbz2.1.0.dylib
22+       ln -s libbz2.1.0.2.dylib libbz2.1.dylib
23+       ln -s libbz2.1.0.2.dylib libbz2.dylib
24+
25 check: test
26 test: bzip2
27        @cat words1
28-       ./bzip2 -1  < sample1.ref > sample1.rb2
29-       ./bzip2 -2  < sample2.ref > sample2.rb2
30-       ./bzip2 -3  < sample3.ref > sample3.rb2
31-       ./bzip2 -d  < sample1.bz2 > sample1.tst
32-       ./bzip2 -d  < sample2.bz2 > sample2.tst
33-       ./bzip2 -ds < sample3.bz2 > sample3.tst
34+       DYLD_LIBRARY_PATH=. ./bzip2 -1  < sample1.ref > sample1.rb2
35+       DYLD_LIBRARY_PATH=. ./bzip2 -2  < sample2.ref > sample2.rb2
36+       DYLD_LIBRARY_PATH=. ./bzip2 -3  < sample3.ref > sample3.rb2
37+       DYLD_LIBRARY_PATH=. ./bzip2 -d  < sample1.bz2 > sample1.tst
38+       DYLD_LIBRARY_PATH=. ./bzip2 -d  < sample2.bz2 > sample2.tst
39+       DYLD_LIBRARY_PATH=. ./bzip2 -ds < sample3.bz2 > sample3.tst
40        cmp sample1.bz2 sample1.rb2
41        cmp sample2.bz2 sample2.rb2
42        cmp sample3.bz2 sample3.rb2
43@@ -77,15 +86,20 @@
44        chmod a+r $(PREFIX)/include/bzlib.h
45        cp -f libbz2.a $(PREFIX)/lib
46        chmod a+r $(PREFIX)/lib/libbz2.a
47+       cp -f libbz2.1.0.2.dylib $(PREFIX)/lib
48+       chmod a+r $(PREFIX)/lib/libbz2.a
49+       cp -f libbz2.1.0.dylib $(PREFIX)/lib
50+       cp -f libbz2.1.dylib $(PREFIX)/lib
51+       cp -f libbz2.dylib $(PREFIX)/lib
52        cp -f bzgrep $(PREFIX)/bin/bzgrep
53-       ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
54-       ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
55+       ln -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
56+       ln -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
57        chmod a+x $(PREFIX)/bin/bzgrep
58        cp -f bzmore $(PREFIX)/bin/bzmore
59-       ln $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
60+       ln -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
61        chmod a+x $(PREFIX)/bin/bzmore
62        cp -f bzdiff $(PREFIX)/bin/bzdiff
63-       ln $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
64+       ln -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
65        chmod a+x $(PREFIX)/bin/bzdiff
66        cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
67        chmod a+r $(PREFIX)/man/man1/bzgrep.1
68@@ -98,7 +112,7 @@
69 
70 distclean: clean
71 clean:
72-       rm -f *.o libbz2.a bzip2 bzip2recover \
73+       rm -f *.o libbz2.a libbz2.*.dylib bzip2 bzip2recover \
74        sample1.rb2 sample2.rb2 sample3.rb2 \
75        sample1.tst sample2.tst sample3.tst
76