INSTALL_DIR=please_set_the_INSTALL_DIR_variable_in_the_top_level_makefile_and_run_make_config

ALL_PDF=ports.pdf creating_and_running.pdf example_counter.pdf tmumon.pdf
ALL=ports.ps creating_and_running.ps example_counter.ps tmumon.ps

all:	$(ALL_PDF)

install:
	-mkdir $(INSTALL_DIR)/doc
	cp $(ALL_PDF) $(INSTALL_DIR)/doc

ports.pdf:	ports.ps
	ps2pdf12 ports.ps ports.pdf

creating_and_running.pdf:	creating_and_running.ps
	ps2pdf12 creating_and_running.ps creating_and_running.pdf

example_counter.pdf:	example_counter.ps
	ps2pdf12 example_counter.ps example_counter.pdf

tmumon.pdf:	tmumon.ps
	ps2pdf12 tmumon.ps tmumon.pdf

ports.ps:	ports portspic.ps
	psfig ports | tbl | psroff -t -mX > ports.ps

portspic.ps:	portspic.xpic
	-x2ps portspic.xpic > portspic.ps

tmumon.ps:	tmumon.r
	tbl tmumon.r | psroff -t -mX > tmumon.ps

example.ps:	example.r
	tbl example.r | psroff -t -mX > example.ps

example_counter.ps:	example_counter.r
	tbl example_counter.r | psroff -t -mX > example_counter.ps

creating_and_running.ps:	creating_and_running
	tbl creating_and_running | psroff -t -mX > creating_and_running.ps

clean:
	rm -f ports.ps creating_and_running.ps portspic.ps example.ps example_counter.ps tmumon.ps
	rm -f $(ALL_PDF)
