netcalc/Makefile
2018-10-29 10:18:00 +01:00

17 lines
303 B
Makefile

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