RANK         =     5
YUUGI_KAISUU = 17500
SIKOU_DAISUU = 10000
SIKEN_SYURUI =     1

all: data test

clean:
	cmd.exe /C IF EXIST *.obj      DEL /Q *.obj
	cmd.exe /C IF EXIST *.exe      DEL /Q *.exe
	cmd.exe /C IF EXIST *.html     DEL /Q *.html
	cmd.exe /C IF EXIST SlotData.* DEL /Q SlotData.*
	cmd.exe /C IF EXIST log.*      DEL /Q log.*

data: index.html SlotData.c
	cmd.exe /C START index.html

index.html SlotData.c: SlotSpec.exe
	$^

SlotSpec.exe: SlotSpec.c
	cl /O2 /W3 /IC:\Home\Share\Piece\clip /Fe$@ /DEXTCLIPH            $(filter %c,$^)

test: SlotTest.exe
	$^ $(RANK) $(YUUGI_KAISUU) $(SIKOU_DAISUU) $(SIKEN_SYURUI)
	ECHO set terminal png; \
	     set output "log.png"; \
	     plot 0 w l lc 0, "log.txt" using 9 w l lc 1; \
	| gnuplot.exe
	cmd.exe /C START log.png

SlotTest.exe: SlotTest.c SlotData.c LotTbl.h LotTbl.c LotTblNo.h LotTblNo.c
	cl /O2 /W3 /IC:\Home\Share\Piece\clip /Fe$@ /DEXTCLIPH /DUSE_NAME $(filter %c,$^)

