# Makefile for 6.004-related GIFs to support the course web page.
# See README in this directory for (slightly) more info.

# CHANGE the following to the name of your Ghostscript command; note that
# Aladdin's gs version 3.12 doesnt work with Webify (hence the following).
# Webify works fine with the GNU version 2.6.1.  If this is your installed
# Ghostscript version, the following line should probably define GS = gs

GS = gs 		# Standard installed name.

all:		webify webifydoc webify.help

tar:		webify.tar.Z

webify:		webify.c
		gcc -o webify webify.c

webifydoc:	webify webify.template webifydoc.ps
		webify -g $(GS) -h -t "Webify" webify.template webifydoc

webify.help:	webify
		webify >webify.help

PS2:		Makefile PS2.ps
		webify -v -T 14 -S 100 template PS2

webify.tar.Z:	Makefile webify.template webify.c webifydoc.ps notes.html \
		   webify.man Pix
		tar crf webify.tar $>
		compress webify.tar

### This stuff is only for my debugging...

# Make a Portrait-mode version of the sample file:
webifydoc1:	webify webify.template webifydoc.ps
		- ln webifydoc.ps webifydoc1.ps
		webify -g $(GS) -v -t "Webify" webify.template webifydoc1

# Make a Seascape (upside-down Landscape) mode version:
webifydoc2:	webify webify.template webifydoc.ps
	- ln webifydoc.ps webifydoc2.ps
		webify -g $(GS) -f -h -t "Webify" webify.template webifydoc2

test:		webify test.template Makefile test.ps
		webify -g $(GS) -d -h -t "Webify TEST" test.template test

dbg:
		- rm test/T*
		gs -sDEVICE=gif8 -dNOPAUSE s3

