CC = lcc
CFLAGS =

TESTS = 8q array cq cvt fields incr init limits sort spill stdarg struct \
	switch

REMOVES = 8q.x array.x cq.x cvt.x fields.x front.x incr.x init.x limits.x \
	paranoia.x sort.x spill.x stdarg.x struct.x switch.x cf.x wf1.x \
	yacc.x

.c.1:
	$(CC) $(CFLAGS) -o $@ $<

.c.2:
	gcc -O -mstubs -o $@ $<

.c.x:
	rm -f $*.1 $*.2

tests:	$(TESTS) cf wf1 yacc

$(TESTS):
	test $@

cf:
	test cf cf/0

wf1:
	test wf1 wf1/0

yacc:
	test yacc yacc/0

front:
	$(CC) $(CFLAGS) front.c
	gcc front.c

paranoia:
	test paranoia

clean:	$(REMOVES)
	rm -f output1 output2
