ROOTDIR		= D:/ilt/dotnet/src/Ilog/Language
ROOT		= Ilog.Language
LIBS		= -lib:"${ROOTDIR}/Tools/lib/" \
		  -lib:"${ROOTDIR}/Syntax/lib/"
REFS		= -r:"${ROOT}.Tools.dll" \
		  -r:"${ROOT}.Syntax.dll"
COMPILE		= csc -nologo -o -t:exe ${LIBS} ${REFS}
DEBUG		= csc -nologo -debug -t:exe ${LIBS} ${REFS}
RM		= \rm -rf
SAY		= echo "***"

main: clean Jacc

Jacc:
	@${SAY} Compiling Jacc.cs
	@${COMPILE} Jacc.cs
	@${SAY} Wrote ${ROOTDIR}/Jacc/Jacc.exe

debug: clean
	@./debug
	@cp ${ROOTDIR}/*/lib/*.dll .
	@${SAY} Compiling debuggable Jacc.cs
	@${DEBUG} Jacc.cs

clean: tidy
	@${SAY} Removing ${ROOTDIR}/Jacc/Jacc.exe
	@${RM} ${ROOTDIR}/Jacc/*.exe

tidy:
	@${RM} ,* @*@
