-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
34 lines (25 loc) · 849 Bytes
/
Makefile
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
27
28
29
30
31
32
33
34
# GNU Makefile
CFLAGS = -O3 -Wextra -Wall
CFILES = SearchGame.c TransGame.c Game.c
JAVAFILES = SearchGame.java Connect4.java Game.java TransGame.java
HASKELLFILES = Main.hs Connect4.hs GameTreeSearch.hs
FILES = Makefile inputs $(CFILES) $(JAVAFILES) $(HASKELLFILES)
.PHONY : all exe run java haskell clean
all : SearchGame
clean : ; rm -f SearchGame SearchGame.ghc *.class *.o *.hi *.tar.gz *.zip
run : SearchGame inputs
./SearchGame < inputs
SearchGame : $(CFILES)
$(CC) $(CFLAGS) -o $@ $<
java : SearchGame.class
SearchGame.class : $(JAVAFILES)
javac -O $<
# to run, 'java SearchGame < inputs'
haskell : SearchGame.ghc
SearchGame.ghc : $(HASKELLFILES)
ghc -o SearchGame.ghc -O --make $<
# to run, './SearchGame.ghc < inputs'
tar: $(FILES)
tar -cf Fhourstones.tar $(FILES)
gzip Fhourstones.tar
zip -r Fhourstones.zip $(FILES)