From 2e46ca9ccbc358bca93df013b009c1acc2a444a1 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Fri, 2 Dec 2016 13:10:49 +0100 Subject: [PATCH] Add simple makefile to run all programs. --- 2016/Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 2016/Makefile diff --git a/2016/Makefile b/2016/Makefile new file mode 100644 index 0000000..73faa9e --- /dev/null +++ b/2016/Makefile @@ -0,0 +1,18 @@ +SOLUTIONS=$(addsuffix /solution, $(wildcard day-*)) +TESTS=$(sort $(patsubst day-%/solution, test-%, $(SOLUTIONS))) + +.PHONY: all clean test + +all: $(SOLUTIONS) + +clean: + $(RM) $(SOLUTIONS) + +day-%/solution: day-%/solution.rs + rustc -o $@ $^ + +# Utility target to run all the programs +test: $(TESTS) + +test-%: day-%/solution + $^ $(dir $<)input.txt