#  Makefile for utilities library
#
include    ../Rules.runtime

OBJECTS    = utils.o errorlog.o errormsg.o
CFLAGS     += -I${INCDIR} -I.
LIB        = ${LIBDIR}/${UTILS_LIBNAME}

all: ${HDRS} ${OBJECTS} install
	ranlib ${LIB}

.c.o:
	${CC} -c ${CFLAGS} $<
	ar rv ${LIB} $@

utils.o:       utils.h
errorlog.o:    errorlog.h
errormsg.o:    errormsg.h

install:
	rm -f ${INCDIR}/utils.h ${INCDIR}/errormsg.h ${INCDIR}/errorlog.h
	cp *.h ${INCDIR}

clean:
	rm -f *.o *.bak *.rem ${LIB} *~ ${INCDIR}/utils.h \
        ${INCDIR}/errormsg.h ${INCDIR}/errorlog.h

