pbzip2-1.1.2-makefile.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Index: Makefile
  2. ===================================================================
  3. --- Makefile.orig
  4. +++ Makefile
  5. @@ -2,8 +2,6 @@
  6. SHELL = /bin/sh
  7. # Compiler to use
  8. -CC = g++
  9. -CFLAGS = -O2
  10. #CFLAGS += -g -Wall
  11. #CFLAGS += -ansi
  12. #CFLAGS += -pedantic
  13. @@ -12,7 +10,7 @@ CFLAGS = -O2
  14. # Comment out CFLAGS line below for compatability mode for 32bit file sizes
  15. # (less than 2GB) and systems that have compilers that treat int as 64bit
  16. # natively (ie: modern AIX)
  17. -CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  18. +CXXFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  19. # Uncomment CFLAGS line below if you want to compile pbzip2 without load
  20. # average support for systems that do not support it
  21. @@ -22,10 +20,10 @@ CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_
  22. #CFLAGS += -DPBZIP_DEBUG
  23. # Comment out CFLAGS line below to disable pthread semantics in code
  24. -CFLAGS += -D_POSIX_PTHREAD_SEMANTICS
  25. +CXXFLAGS += -D_POSIX_PTHREAD_SEMANTICS
  26. # Comment out CFLAGS line below to disable Thread stack size customization
  27. -CFLAGS += -DUSE_STACKSIZE_CUSTOMIZATION
  28. +CXXFLAGS += -DUSE_STACKSIZE_CUSTOMIZATION
  29. # Comment out CFLAGS line below to explicity set ignore trailing garbage
  30. # default behavior: 0 - disabled; 1 - enabled (ignore garbage by default)
  31. @@ -34,11 +32,11 @@ CFLAGS += -DUSE_STACKSIZE_CUSTOMIZATION
  32. #CFLAGS += -DIGNORE_TRAILING_GARBAGE=1
  33. # On some compilers -pthreads
  34. -CFLAGS += -pthread
  35. +CXXFLAGS += -pthread
  36. # External libraries
  37. -LDFLAGS = -lbz2
  38. -LDFLAGS += -lpthread
  39. +LIBS = -lbz2
  40. +LIBS += -lpthread
  41. # Where you want pbzip2 installed when you do 'make install'
  42. PREFIX = /usr
  43. @@ -47,11 +45,11 @@ all: pbzip2
  44. # Standard pbzip2 compile
  45. pbzip2: pbzip2.cpp BZ2StreamScanner.cpp ErrorContext.cpp
  46. - $(CC) $(CFLAGS) $^ -o pbzip2 $(LDFLAGS)
  47. + $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o pbzip2
  48. # Choose this if you want to compile in a static version of the libbz2 library
  49. pbzip2-static: pbzip2.cpp BZ2StreamScanner.cpp ErrorContext.cpp libbz2.a
  50. - $(CC) $(CFLAGS) $^ -o pbzip2 -I. -L. $(LDFLAGS)
  51. + $(CXX) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o pbzip2 -I. -L.
  52. # Install the binary pbzip2 program and man page
  53. install: pbzip2