aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-08-19 11:05:43 +0200
committertomsmeding <tom.smeding@gmail.com>2017-08-19 11:05:43 +0200
commit694ec05bcad01fd27606aace73b49cdade16945e (patch)
tree5c7a0433232f0860ef18f1634510d4f823ce5bdb /Makefile
Initial
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3ce6d7e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+RUNFLAGS =
+GHCFLAGS = -Wall -Widentities -odir obj -hidir obj
+ifneq ($(PROFILE),)
+ RUNFLAGS += +RTS -xc
+ GHCFLAGS += -prof -fprof-auto
+else
+ GHCFLAGS += -O3
+endif
+
+TARGET = main
+
+.PHONY: all clean run
+
+all: $(TARGET)
+
+clean:
+ rm -f $(TARGET)
+ rm -rf obj
+
+run: $(TARGET)
+ ./$(TARGET) $(RUNFLAGS)
+
+
+$(TARGET): $(wildcard *.hs)
+ @mkdir -p obj
+ ghc $(GHCFLAGS) Main.hs -o $@