| 1 |
# Make file for parallel BZIP2 (customized for Solaris 10 64-bit/SPARC IV+) |
| 2 |
SHELL = /bin/sh |
| 3 |
|
| 4 |
# Compiler to use |
| 5 |
CC=CC |
| 6 |
CFLAGS = -m64 |
| 7 |
CFLAGS += -fast -xO5 |
| 8 |
|
| 9 |
#CFLAGS += -Wall |
| 10 |
#CFLAGS += -g |
| 11 |
CFLAGS += -mt -lpthread |
| 12 |
|
| 13 |
# Comment out CFLAGS line below for compatability mode for 32bit file sizes |
| 14 |
# (less than 2GB) and systems that have compilers that treat int as 64bit |
| 15 |
# natively (ie: modern AIX) |
| 16 |
#CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 |
| 17 |
|
| 18 |
# Uncomment CFLAGS line below if you want to compile pbzip2 without load |
| 19 |
# average support for systems that do not support it |
| 20 |
#CFLAGS += -DPBZIP_NO_LOADAVG |
| 21 |
|
| 22 |
# Uncomment CFLAGS line below to get debug output |
| 23 |
#CFLAGS += -DPBZIP_DEBUG |
| 24 |
|
| 25 |
# Comment out CFLAGS line below to disable pthread semantics in code |
| 26 |
CFLAGS += -D_POSIX_PTHREAD_SEMANTICS |
| 27 |
|
| 28 |
# Comment out CFLAGS line below to disable Thread stack size customization |
| 29 |
CFLAGS += -DUSE_STACKSIZE_CUSTOMIZATION |
| 30 |
|
| 31 |
# Libraries |
| 32 |
LDFLAGS = -lbz2 |
| 33 |
LDFLAGS += -lpthread |
| 34 |
|
| 35 |
# Where you want pbzip2 installed when you do 'make install' |
| 36 |
PREFIX = /usr |
| 37 |
|
| 38 |
all: pbzip2 |
| 39 |
|
| 40 |
# Standard pbzip2 compile |
| 41 |
pbzip2: pbzip2.cpp BZ2StreamScanner.cpp ErrorContext.cpp |
| 42 |
$(CC) $(CFLAGS) $^ -o pbzip2 ${LDFLAGS} |
| 43 |
|
| 44 |
# Choose this if you want to compile in a static version of the libbz2 library |
| 45 |
pbzip2-static: pbzip2.cpp BZ2StreamScanner.cpp ErrorContext.cpp libbz2.a |
| 46 |
$(CC) $(CFLAGS) $^ -o pbzip2 -I. -L. $(LDFLAGS) |
| 47 |
|
| 48 |
# Install the binary pbzip2 program and man page |
| 49 |
install: pbzip2 |
| 50 |
if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi |
| 51 |
if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi |
| 52 |
if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi |
| 53 |
cp -f pbzip2 $(PREFIX)/bin/pbzip2 |
| 54 |
chmod a+x $(PREFIX)/bin/pbzip2 |
| 55 |
ln -s -f pbzip2 $(PREFIX)/bin/pbunzip2 |
| 56 |
ln -s -f pbzip2 $(PREFIX)/bin/pbzcat |
| 57 |
cp -f pbzip2.1 $(PREFIX)/man/man1 |
| 58 |
chmod a+r $(PREFIX)/man/man1/pbzip2.1 |
| 59 |
|
| 60 |
clean: |
| 61 |
rm -f *.o pbzip2 |