outname=test
outext=tga
rpath=i:\progra~1\max2
renderer=$(rpath)\3dsmax.exe
renderopts=-U MAXScript
script=render.ms
all:
	$(renderer)	$(renderopts) $(script)
	move $(rpath)\images\$(outname)up0000.$(outext) .\$(outname)up.$(outext)
	move $(rpath)\images\$(outname)dn0000.$(outext) .\$(outname)dn.$(outext)
	move $(rpath)\images\$(outname)lf0000.$(outext) .\$(outname)lf.$(outext)
	move $(rpath)\images\$(outname)rt0000.$(outext) .\$(outname)rt.$(outext)
	move $(rpath)\images\$(outname)ft0000.$(outext) .\$(outname)ft.$(outext)
	move $(rpath)\images\$(outname)bk0000.$(outext) .\$(outname)bk.$(outext)
compress:
	gzip .\$(outname)up.$(outext)
	gzip .\$(outname)dn.$(outext)
	gzip .\$(outname)lf.$(outext)
	gzip .\$(outname)rt.$(outext)
	gzip .\$(outname)ft.$(outext)
	gzip .\$(outname)bk.$(outext)
clean:
	if exist $(outname)*.$(outext) del $(outname)*.$(outext)
	if exist $(outname)*.$(outext).gz del $(outname)*.$(outext).gz
