diff --git a/Makefile b/Makefile index 14602f7..fcfcba1 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,13 @@ all: $(FILE) tests .PHONY: clean clean: - rm netcalc test/results + rm $(FILE) netcalc test/results test/$(FILE).pid $(FILE): $(FILE).c gcc $^ -o $@ -tests: - ./netcalc -c < test/cases > test/results +tests: $(FILE) + ./$(FILE) & echo $$! > test/$(FILE).pid + ./$(FILE) -c < test/cases > test/results + kill `cat test/$(FILE).pid` diff test/results test/expected