diff --git a/c/makefile b/c/makefile index d4f0dfe..b21d8cf 100644 --- a/c/makefile +++ b/c/makefile @@ -1,7 +1,15 @@ -OBJS = main.o hours.o +DEPS = hours.o period.o -wh: $(OBJS) +wh: main.o $(DEPS) gcc $^ -o $@ %.o: %.c %.h gcc -c $< -Wall + +.PHONY: test +test: wh_tests + ./wh_tests + rm ./wh_tests + +wh_tests: wh_tests.o $(DEPS) + gcc $^ -o $@