# $Id: Makefile.in,v 1.1.1.1 1998/12/30 18:09:11 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@
bindir=@bindir@
mandir=@mandir@
datadir=@datadir@

CC=@CC@
DEFS=@DEFS@
CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@
X_CFLAGS=@X_CFLAGS@
LDFLAGS=@LDFLAGS@
X_LIBS=@X_LIBS@
X_PRE_LIBS=@X_PRE_LIBS@
X_EXTRA_LIBS=@X_EXTRA_LIBS@
LIBS=@LIBS@
ALL_LDFLAGS=${LDFLAGS} ${X_LIBS}
ALL_CFLAGS=${CPPFLAGS} ${CFLAGS} ${X_CFLAGS} ${DEFS}
ALL_LIBS=-lhesiod -lXj ${X_PRE_LIBS} -lX11 ${X_EXTRA_LIBS} ${LIBS}

XOBJS=xcluster.o read.o net.o check.o
COBJS=cview.o net.o

all: xcluster cview

xcluster: ${XOBJS}
	${CC} ${ALL_LDFLAGS} -o $@ ${XOBJS} ${ALL_LIBS}

cview: ${COBJS}
	${CC} ${ALL_LDFLAGS} -o $@ ${COBJS} ${ALL_LIBS}

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

check:

install:
	${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
	${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
	${top_srcdir}/mkinstalldirs ${DESTDIR}${datadir}/X11/app-defaults
	${INSTALL_PROGRAM} xcluster ${DESTDIR}${bindir}
	${INSTALL_PROGRAM} cview ${DESTDIR}${bindir}
	${INSTALL} -m 444 ${srcdir}/xcluster.1 ${DESTDIR}${mandir}/man1
	${INSTALL} -m 444 ${srcdir}/cview.1 ${DESTDIR}${mandir}/man1
	${INSTALL} -m 444 Xcluster ${DESTDIR}${datadir}/X11/app-defaults

clean:
	rm -f ${XOBJS} ${COBJS} xcluster cview

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