Makefile-libbz2_so 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # This Makefile builds a shared version of the library,
  2. # libbz2.so.1.0.6, with soname libbz2.so.1.0,
  3. # at least on x86-Linux (RedHat 7.2),
  4. # with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).
  5. # Please see the README file for some important info
  6. # about building the library like this.
  7. # ------------------------------------------------------------------
  8. # This file is part of bzip2/libbzip2, a program and library for
  9. # lossless, block-sorting data compression.
  10. #
  11. # bzip2/libbzip2 version 1.0.6 of 6 September 2010
  12. # Copyright (C) 1996-2010 Julian Seward <jseward@bzip.org>
  13. #
  14. # Please read the WARNING, DISCLAIMER and PATENTS sections in the
  15. # README file.
  16. #
  17. # This program is released under the terms of the license contained
  18. # in the file LICENSE.
  19. # ------------------------------------------------------------------
  20. SHELL=/bin/sh
  21. CC=gcc
  22. BIGFILES=-D_FILE_OFFSET_BITS=64
  23. CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
  24. OBJS= blocksort.o \
  25. huffman.o \
  26. crctable.o \
  27. randtable.o \
  28. compress.o \
  29. decompress.o \
  30. bzlib.o
  31. all: $(OBJS)
  32. $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
  33. $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
  34. rm -f libbz2.so.1.0
  35. ln -s libbz2.so.1.0.6 libbz2.so.1.0
  36. clean:
  37. rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
  38. blocksort.o: blocksort.c
  39. $(CC) $(CFLAGS) -c blocksort.c
  40. huffman.o: huffman.c
  41. $(CC) $(CFLAGS) -c huffman.c
  42. crctable.o: crctable.c
  43. $(CC) $(CFLAGS) -c crctable.c
  44. randtable.o: randtable.c
  45. $(CC) $(CFLAGS) -c randtable.c
  46. compress.o: compress.c
  47. $(CC) $(CFLAGS) -c compress.c
  48. decompress.o: decompress.c
  49. $(CC) $(CFLAGS) -c decompress.c
  50. bzlib.o: bzlib.c
  51. $(CC) $(CFLAGS) -c bzlib.c