home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2001 June
/
VPR0106A.BIN
/
OLS
/
BZ2L003
/
bz2l003.lzh
/
BZ2LIB
/
MAKEFILE.UNX
< prev
next >
Wrap
Text File
|
1998-06-02
|
1KB
|
68 lines
#
# Makefile for bz2lib (UNIX Version)
# by Yoshioka Tsuneo(QWF00133@niftyserve.or.jp)
# This program is distributed under GPL.
#
# To compile, type:
# make
# To install, type:
# make install
# or
# cp libbz2.* /usr/local/lib
# cp bz2lib.h /usr/local/include
# To make test program:
# make minibz2
#
#CC=cc
#CFLAGS=-O
#LDFLAGS=-L. -lz
#LDSHARED=$(CC)
#VER=1.0.4
LIBS=libbz2.a
AR=ar rc
RANLIB=ranlib
TAR=tar
prefix=/usr/local
exec_prefix = $(prefix)
OBJS = bzip2.o stringq.o bz2lib.o
all: $(LIBS)
libbz2.a: $(OBJS)
$(AR) $@ $(OBJS)
$(RANLIB) $@
minibz2: minibz2.c $(LIBS)
$(CC) -o minibz2 minibz2.c -L. -lbz2
install: $(LIBS)
-@if [ ! $(prefix)/include ]; then mkdir $(prefix)/include; fi
-@if [ ! $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi
cp bz2lib.h $(prefix)/include
chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
cp $(LIBS) $(exec_prefix)/lib
cd $(exec_prefix)/lib; chmod 644 $(LIBS)
-@(cd $(exec_prefix)/lib; $(RANLIB) libbz2.a || true) >/dev/null 2>&1
# The ranlib in install is needed on NeXTSTEP which checks file times
clean:
rm -f *.o *~ libbz2.a
tags:
etags *.[ch]
depend:
makedepend -- $(CFLAGS) -- *.[ch]
# DO NOT DELETE THIS LINE -- make depend depends on it.
bzip2.o: bzip2.h bz2lib.h bz2lib.h
stringq.o: stringq.h
bz2lib.o: bz2lib.h stringq.h bzip2.h