17 lines
303 B
Makefile
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
|