#
# Copyright, 1986, Massachusetts Institute of Technology.
#	xcons - trivial program to snarf console output and redirect it.
#
#	opus additions:
#		xcons - not so trivial program to provide full console (dos or unix)
#			input and output
#		xkmsg - old xcons, just gets kernel printfs and sends thme to output
#

DESTDIR =
INCLUDES = -I../include

CONFDIR = /usr/new
CFLAGS = $(OPT) $(DEBUG) $(INCLUDES)
PROG = xkmsg xcons
LIBS = ../Xlib/libX.a #-lnsl_s

all: $(PROG)

xkmsg.o:	xkmsg.c

xcons.o:	xcons.c opus.cursor

.c.o:
	$(CC) -c $(CFLAGS) $*.c

xcons: xcons.o
	-if clipper; then\
		$(CC) $(CLFAGS) -o xcons xcons.o /usr/lib/phmsys.o /usr/lib/sys3b.o \
../Xtlib/libXt.a $(LIBS) -lopus; \
	else \
		$(CC) $(CLFAGS) -o xcons xcons.o ../Xtlib/libXt.a $(LIBS) -lopus; \
	fi

xkmsg: xkmsg.o
	$(CC) $(CLFAGS) -o xkmsg xkmsg.o $(LIBS)

install: all
	../install -c xkmsg $(DESTDIR)$(CONFDIR)
	../install -c -m 4755 xcons $(DESTDIR)$(CONFDIR)

clobber:
	rm -f *.o core xcons

