diff options
Diffstat (limited to 'test/Makefile')
-rw-r--r-- | test/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..3b9b4a7 --- /dev/null +++ b/test/Makefile @@ -0,0 +1,27 @@ +EXE:=Test +DEP:=ArbitraryMove +AUX:=$(addsuffix .o, $(EXE) $(DEP))\ + $(addsuffix .hi, $(EXE) $(DEP))\ + $(addsuffix .dyn_o, $(EXE) $(DEP))\ + $(addsuffix .dyn_hi,$(EXE) $(DEP)) +SRC:=$(addsuffix .hs,$(DEP)) +GHC:=ghc +GHCFLAGS:=-O -main-is Test.main + +.PHONY=all data run clean + +all: $(EXE) + +dataset.pgn: + for i in $$(seq 1000 1020); do wget -q http://www.theweekinchess.com/zips/twic$${i}g.zip; unzip -q twic$${i}g.zip; rm twic$${i}g.zip; done + cat twic*.pgn > $@ + $(RM) twic*.pgn + +run: $(EXE) + ./$(EXE) < dataset.pgn + +$(EXE): %: %.hs $(SRC) + $(GHC) $(GHCFLAGS) $< -o $@ + +clean: + $(RM) $(EXE) $(AUX) |