From bc148ac3b74605cf556bb144dd2cf5118afc10c4 Mon Sep 17 00:00:00 2001 From: germax26 Date: Tue, 3 Dec 2024 00:29:42 +1100 Subject: [PATCH] Add Makefile --- .gitignore | 3 +++ Makefile | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index a146bb1..ac29d50 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ input.txt .DS_Store +*.hi +*.o +*/*/day[0-9][0-9] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5f24696 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +HS_SRCS = $(shell find . -name 'day*.hs') +HS_TARGETS = $(HS_SRCS:.hs=) + +all: $(HS_TARGETS) + +%: %.hs + ghc $< + +clean: $(HS_TARGETS) + rm -rf $(HS_TARGETS) + +.PHONY: all clean \ No newline at end of file