# $Id: Makefile.in,v 1.2 1999-10-19 20:23:31 danw Exp $

SHELL=/bin/sh
VPATH=@srcdir@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
sbindir=@sbindir@
includedir=@includedir@
mandir=@mandir@

CC=@CC@
DEFS=@DEFS@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@ ${WARN_CFLAGS}
LDFLAGS=@LDFLAGS@
LIBS=@HESIOD_LIBS@ @LIBS@ -lares
ALL_CFLAGS=${CPPFLAGS} ${CFLAGS} ${DEFS}

OBJS=config.o larvnetd.o printer.o report.o timer.o util.o ws.o

all: larvnetd

larvnetd: ${OBJS}
	${CC} ${LDFLAGS} -o larvnetd ${OBJS} ${LIBS}

.c.o:
	${CC} -c ${ALL_CFLAGS} $<

${OBJS}: larvnetd.h timer.h

check:

install:
	${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
	${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}
	${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5
	${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
	${INSTALL_PROGRAM} larvnetd ${DESTDIR}${sbindir}
	${INSTALL} -m 444 ${srcdir}/larvnetd.8 ${DESTDIR}${mandir}/man8
	${INSTALL} -m 444 ${srcdir}/larvnet.conf.5 ${DESTDIR}${mandir}/man5
	${INSTALL} -m 444 ${srcdir}/larvnet.cgroups.5 ${DESTDIR}${mandir}/man5
	${INSTALL} -m 444 ${srcdir}/larvnet.clusters.5 ${DESTDIR}${mandir}/man5
	${INSTALL} -m 444 ${srcdir}/larvnet.printers.5 ${DESTDIR}${mandir}/man5

clean:
	rm -f ${OBJS} larvnetd

distclean: clean
	rm -f config.cache config.log config.status Makefile
