summaryrefslogtreecommitdiff
path: root/2024/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '2024/Makefile')
-rw-r--r--2024/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/2024/Makefile b/2024/Makefile
new file mode 100644
index 0000000..0d5001f
--- /dev/null
+++ b/2024/Makefile
@@ -0,0 +1,16 @@
+HS_SRC := $(wildcard *.hs)
+HS_EXE := $(HS_SRC:.hs=)
+OBJDIR := .obj
+
+.PHONY: all clean
+
+all: $(HS_EXE)
+
+clean:
+ rm -rf $(HS_EXE) $(OBJDIR)
+
+$(HS_EXE): %: %.hs | $(OBJDIR)
+ ghc -Wall -hidir $(OBJDIR) -odir $(OBJDIR) -o $@ $<
+
+$(OBJDIR):
+ mkdir $(OBJDIR)