OBJS =	api.o inbound.o oia.o options.o outbound.o printscreen.o

all: kbd.out ctlrlib.a

ctlrlib.a:	${OBJS}
	rm -f $@
	for i in ${OBJS}; do (ar rc $@ $$i); done
	ranlib $@

clean:
	@echo "Cleaning tn3270/ctlr..."
	@rm -f *.o mset tn3270 prt3270 m4.out errs ctlrlib.a kbd.out \
		TMPfunc.out

kbd.out:	${KBD} hostctlr.h
	(cd ../tools; make mkhits )
	rm -f $@ TMPfunc.out
	${CC} ${CFLAGS} -E function.c > TMPfunc.out
	../tools/mkhits - ../ctlr/TMPfunc.out < ${KBD} > $@
	rm -f TMPfunc.out
