all: minimalgame.c.html gcg2board allmoves.c.html friends.c.html allmoves-latin1.c.html findmoves.c.html friendsmoves.c.html megamoves.c.html stackmove.c.html wordox.c.html fixedprob.c.html # freq.c.html rackprob.c.html rackleave.c.html test.c.html minimax.c.html crosscheck.c.html fix_scrabble.c.html gameconfig.c global-main.c readboard.c shuffle.c slot.c
	echo All up to date

gcg2board: gcg2board.c
	cc -Wall -o gcg2board gcg2board.c

install: /home/gtoal/cgi-bin/allmoves.cgi /home/gtoal/cgi-bin/friends.cgi
	echo All up to date

/home/gtoal/cgi-bin/allmoves.cgi: allmoves
	cp allmoves /home/gtoal/cgi-bin/allmoves.cgi

/home/gtoal/cgi-bin/friends.cgi: friends
	cp friends /home/gtoal/cgi-bin/friends.cgi

crosscheck.c.html: crosscheck.c
	ctohtml crosscheck.c > crosscheck.c.html

fix_scrabble.c.html: fix_scrabble.c
	ctohtml fix_scrabble.c > fix_scrabble.c.html

gameconfig.c.html: gameconfig.c
	ctohtml gameconfig.c > gameconfig.c.html

global-main.c.html: global-main.c
	ctohtml global-main.c > global-main.c.html

readboard.c.html: readboard.c
	ctohtml readboard.c > readboard.c.html

shuffle.c.html: shuffle.c
	ctohtml shuffle.c > shuffle.c.html

slot.c.html: slot.c
	ctohtml slot.c > slot.c.html

freq.c.html: freq
	ctohtml freq.c > freq.c.html

findmoves.c.html: findmoves global_analysis/rackgen.c
	ctohtml findmoves.c > findmoves.c.html
	recode ISO-8859-1..UTF-8 findmoves.c.html

minimalgame.c.html: minimalgame global_analysis/rackgen.c
	ctohtml minimalgame.c > minimalgame.c.html
	recode ISO-8859-1..UTF-8 minimalgame.c.html

friendsmoves.c.html: friendsmoves global_analysis/rackgen.c
	ctohtml friendsmoves.c > friendsmoves.c.html
	recode ISO-8859-1..UTF-8 friendsmoves.c.html

minimax.c.html: minimax
	ctohtml minimax.c > minimax.c.html

allmoves-latin1.c.html: allmoves-latin1
	ctohtml allmoves-latin1.c > allmoves-latin1.c.html

allmoves.c.html: allmoves
	ctohtml allmoves.c > allmoves.c.html

friends.c.html: friends
	ctohtml friends.c > friends.c.html

megamoves.c.html: megamoves
	ctohtml megamoves.c > megamoves.c.html

stackmove.c.html: stackmove
	ctohtml stackmove.c > stackmove.c.html

wordox.c.html: wordox
	ctohtml wordox.c > wordox.c.html

rackleave.c.html: rackleave
	ctohtml rackleave.c > rackleave.c.html

fixedprob.c.html: fixedprob
	ctohtml fixedprob.c > fixedprob.c.html

test.c.html: test2
	ctohtml test.c > test.c.html

# rackprob.c.html

# fixedprob supercedes rackprob

clean:
	rm megamoves findmoves minimalgame friendsmoves stackmove wordox # rackleave rackprob test

rackleave: rackleave.c
	gcc -g -o rackleave rackleave.c -lm

fixedprob: fixedprob.c
	gcc -g -o fixedprob fixedprob.c

rackprob: rackprob.c
	gcc -g -o rackprob rackprob.c

findmoves: findmoves.c mnemosyne.o global_analysis/latin1.c fix_scrabble.c crosscheck.c gameconfig.c slot.c readboard.c global-main.c minimax-main.c
	gcc -g -o findmoves findmoves.c mnemosyne.o -L../bigspell -lspell -I../bigspell

minimalgame: minimalgame.c mnemosyne.o global_analysis/latin1.c fix_scrabble.c crosscheck.c gameconfig.c slot.c readboard.c global-main.c minimax-main.c
	gcc -g -o minimalgame minimalgame.c mnemosyne.o -L../bigspell -lspell -I../bigspell

friendsmoves: friendsmoves.c mnemosyne.o global_analysis/latin1.c fix_scrabble.c crosscheck.c friendsgameconfig.c slot.c friendsreadboard.c global-main.c minimax-main.c
	gcc -g -o friendsmoves friendsmoves.c mnemosyne.o -L../bigspell -lspell -I../bigspell

megamoves: megamoves.c
	gcc -g -o megamoves megamoves.c -L../bigspell -lspell -I../bigspell

allmoves: allmoves.c debugf.o
	gcc -g -o allmoves allmoves.c -L../bigspell -lspell -I../bigspell -I. cgi_c/util.o debugf.o

friends: friends.c debugf.o
	gcc -g -o friends friends.c -L../bigspell -lspell -I../bigspell -I. cgi_c/util.o debugf.o

allmoves-latin1: allmoves-latin1.c debugf.o
	gcc -g -o allmoves-latin1 allmoves-latin1.c -L../bigspell -lspell -I../bigspell -I. cgi_c/util.o debugf.o

debugf.o: debugf.c debugf.h
	gcc -c debugf.c

stackmove: stackmove.c
	gcc -g -o stackmove stackmove.c -L../bigspell -lspell -I../bigspell

wordox: wordox.c
	gcc -g -o wordox wordox.c -L../bigspell -lspell -I../bigspell

test2: test.c
	cc -g -o test2 test.c -L../bigspell -lspell -I../bigspell

minimax: minimax.c
	cc -g -o minimax minimax.c -L../bigspell -lspell -I../bigspell
