netcalc/Makefile
2016-10-30 02:12:42 +02:00

16 lines
295 B
Makefile

FILE = netcalc
all: $(FILE) tests
.PHONY: clean
clean:
rm $(FILE) test/results test/$(FILE).pid
$(FILE): $(FILE).c
gcc $^ -o $@
tests: $(FILE)
./$(FILE) & echo $$! > test/$(FILE).pid
./$(FILE) -c < test/cases > test/results
kill `cat test/$(FILE).pid`
diff test/results test/expected