#
#  Makefile for the utilities source directory 
#
#  Makefile.in,v 1.11 1995/08/21 20:26:36 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
INCLUDE		= -I../include
CFLAGS		= $(DEBUG) $(INCLUDE)

LIBFILE		= libutil.a 
LIBDIR		= ../lib
OBJS		= buffer.o host.o log.o strdup.o system.o strerror.o \
		  string.o xmalloc.o harvest.o debug.o host_cache.o

all:	$(LIBFILE) install-lib

ctags:
	@ctags -w *.c 

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

realclean:	clean
	-rm -rf Makefile

install:	all

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

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

$(LIBFILE):	$(OBJS)
	ar r $(LIBFILE) $(OBJS)
	$(RANLIB) $(LIBFILE)
