From 9b6317ad8d96353ba802b734ecc5d5fc69a3eb99 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Mon, 29 Jun 2020 21:04:43 -0300 Subject: [PATCH] Build tests --- c/makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 $@