diff options
Diffstat (limited to 'Makefile-libbz2_so')
-rw-r--r-- | Makefile-libbz2_so | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so new file mode 100644 index 0000000..a347c50 --- /dev/null +++ b/Makefile-libbz2_so | |||
@@ -0,0 +1,43 @@ | |||
1 | |||
2 | # This Makefile builds a shared version of the library, | ||
3 | # libbz2.so.1.0.1, with soname libbz2.so.1.0, | ||
4 | # at least on x86-Linux (RedHat 5.2), | ||
5 | # with gcc-2.7.2.3. Please see the README file for some | ||
6 | # important info about building the library like this. | ||
7 | |||
8 | SHELL=/bin/sh | ||
9 | CC=gcc | ||
10 | BIGFILES=-D_FILE_OFFSET_BITS=64 | ||
11 | CFLAGS=-fpic -fPIC -Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce $(BIGFILES) | ||
12 | |||
13 | OBJS= blocksort.o \ | ||
14 | huffman.o \ | ||
15 | crctable.o \ | ||
16 | randtable.o \ | ||
17 | compress.o \ | ||
18 | decompress.o \ | ||
19 | bzlib.o | ||
20 | |||
21 | all: $(OBJS) | ||
22 | $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.1 $(OBJS) | ||
23 | $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.1 | ||
24 | rm -f libbz2.so.1.0 | ||
25 | ln -s libbz2.so.1.0.1 libbz2.so.1.0 | ||
26 | |||
27 | clean: | ||
28 | rm -f $(OBJS) bzip2.o libbz2.so.1.0.1 libbz2.so.1.0 bzip2-shared | ||
29 | |||
30 | blocksort.o: blocksort.c | ||
31 | $(CC) $(CFLAGS) -c blocksort.c | ||
32 | huffman.o: huffman.c | ||
33 | $(CC) $(CFLAGS) -c huffman.c | ||
34 | crctable.o: crctable.c | ||
35 | $(CC) $(CFLAGS) -c crctable.c | ||
36 | randtable.o: randtable.c | ||
37 | $(CC) $(CFLAGS) -c randtable.c | ||
38 | compress.o: compress.c | ||
39 | $(CC) $(CFLAGS) -c compress.c | ||
40 | decompress.o: decompress.c | ||
41 | $(CC) $(CFLAGS) -c decompress.c | ||
42 | bzlib.o: bzlib.c | ||
43 | $(CC) $(CFLAGS) -c bzlib.c | ||