#
#  Makefile for MD5 library code and example
#
#  Makefile.in,v 1.7 1995/08/24 00:31:29 duane Exp
#
prefix = @prefix@
INSTALL_BINDIR	= $(prefix)/bin
INSTALL_LIBDIR	= $(prefix)/lib
INSTALL_MANDIR 	= $(prefix)/man

CC		= @CC@
INSTALL		= @INSTALL@
INSTALL_BIN 	= @INSTALL_PROGRAM@
INSTALL_FILE 	= @INSTALL_DATA@
RANLIB		= @RANLIB@

DEBUG		= $(DEBUG_TOP) #-O #-g #-DDEBUG
CFLAGS		= $(DEBUG)		# may need -O0 on some DEC Unixes
LIBDIR		= ../lib
LIBFILE		= libmd5.a

all:	$(LIBFILE) md5

md5:	$(LIBFILE) $(LIBDIR)/$(LIBFILE) main.o
	$(CC) -o md5 main.o -L$(LIBDIR) -lmd5

$(LIBFILE):	md5.o
	ar r $(LIBFILE) md5.o
	$(RANLIB) $(LIBFILE)

install-lib:	$(LIBDIR)/$(LIBFILE)

$(LIBDIR)/$(LIBFILE):	$(LIBFILE)
	$(INSTALL_FILE) $(LIBFILE) $(LIBDIR)/$(LIBFILE)
	$(RANLIB) $(LIBDIR)/$(LIBFILE)

clean:
	-rm -f core md5 *.o $(LIBFILE) tags

realclean:	clean
	-rm -f Makefile

install: all

shar:
	@shar README Makefile md5.c md5.h main.c

md5.c:	md5.h
main.c:	md5.h
