aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 3ce6d7e06405f8b2425acab419b8bd200a1416c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 $@