.PHONY: all clean tests answers

TESTS_HAND = 01 02 03 04 05 06 07
TESTS_GEN = 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
TESTS = $(TESTS_HAND) $(TESTS_GEN)
ANSWERS = 01.a 02.a 03.a 04.a 05.a 06.a 07.a 08.a 09.a 10.a\
          11.a 12.a 13.a 14.a 15.a 16.a 17.a 18.a 19.a 20.a\
	  21.a 22.a 23.a 24.a 25.a 26.a 27.a 28.a

all: tests answers

tests: tests.hand tests.gen split$(SUFFIX)
	$(RUNRUN)split$(SUFFIX) tests.hand tests.gen

answers: tests
	$(MAKE_ANSWERS)

split$(SUFFIX): split.cpp
	$(COMPILE) -o split$(SUFFIX) split.cpp

tests.gen: gen$(SUFFIX)
	$(RUNRUN)gen$(SUFFIX) > tests.gen

gen$(SUFFIX): gen.cpp
	$(COMPILE) -o gen$(SUFFIX) gen.cpp

clean:
	$(DELETE) $(TESTS) $(ANSWERS) gen$(SUFFIX) split$(SUFFIX) tests.gen

