1
0

patch-Makefile-libbz2_so 933 B

123456789101112131415161718192021222324252627282930313233
  1. --- bzip2-1.0.6.orig/Makefile-libbz2_so 2010-09-11 01:07:52.000000000 +0200
  2. +++ bzip2-1.0.6/Makefile-libbz2_so 2014-01-13 21:51:20.000000000 +0100
  3. @@ -21,10 +21,18 @@
  4. # ------------------------------------------------------------------
  5. -SHELL=/bin/sh
  6. -CC=gcc
  7. +SHELL?=/bin/sh
  8. +CC?=gcc
  9. BIGFILES=-D_FILE_OFFSET_BITS=64
  10. -CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
  11. +CFLAGS?=
  12. +CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES)
  13. +OS=$(shell uname)
  14. +LDOPT=-soname
  15. +ifneq ($(CROSS_COMPILE),1)
  16. +ifeq ($(OS),Darwin)
  17. +LDOPT=-install_name
  18. +endif
  19. +endif
  20. OBJS= blocksort.o \
  21. huffman.o \
  22. @@ -35,7 +43,7 @@ OBJS= blocksort.o \
  23. bzlib.o
  24. all: $(OBJS)
  25. - $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
  26. + $(CC) -shared -Wl,$(LDOPT) -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
  27. $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
  28. rm -f libbz2.so.1.0
  29. ln -s libbz2.so.1.0.6 libbz2.so.1.0