summaryrefslogtreecommitdiff
path: root/2021/Makefile
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2021-12-09 21:19:32 +0100
committerTom Smeding <tom@tomsmeding.com>2021-12-09 21:19:32 +0100
commit8d5debe81041eb0aea1f63c60189aa81a40cebde (patch)
treed06634af295c79539efc71b873483072ed74f601 /2021/Makefile
parent1d02c3d4dd9da29532dcc69af21fc58d21030fc8 (diff)
9
Diffstat (limited to '2021/Makefile')
-rw-r--r--2021/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/2021/Makefile b/2021/Makefile
index 7ad280f..bacaeff 100644
--- a/2021/Makefile
+++ b/2021/Makefile
@@ -3,6 +3,7 @@ GHCBASEFLAGS = -package parsec -package array
GHCFLAGS = $(GHCBASEFLAGS) -Wall -O2 -threaded -fdefer-typed-holes
CXX = g++
CXXFLAGS = -Wall -Wextra -std=c++17 -O2
+FUTHARK = futhark
OBJDIR = obj
@@ -12,8 +13,10 @@ HASKELL_SRC := $(filter-out $(HASKELL_AUX),$(wildcard *.hs))
CPP_SRC := $(filter-out $(CPP_AUX),$(wildcard *.cpp))
HASKELL_BIN := $(HASKELL_SRC:.hs=)
CPP_BIN := $(CPP_SRC:.cpp=)
+FUTHARK_SRC := $(wildcard *.fut)
+FUTHARK_BIN := $(FUTHARK_SRC:.fut=)
-BINARIES := $(HASKELL_BIN) $(CPP_BIN)
+BINARIES := $(HASKELL_BIN) $(CPP_BIN) $(FUTHARK_BIN)
.PHONY: all clean depend
@@ -36,6 +39,9 @@ $(HASKELL_BIN): %: %.hs | $(OBJDIR)/%
$(CPP_BIN): %: %.cpp $(CPP_AUX) | $(OBJDIR)
$(CXX) $(CXXFLAGS) -o $@ $<
+$(FUTHARK_BIN): %: %.fut
+ $(FUTHARK) c $<
+
$(OBJDIR)/%:
mkdir -p $@