#
#       Makefile for sample
#

include ../../Mkinclude

EPSDIR		= sgpack slpack grpack uxyzpk uspack udegpk \
            umpack uipack


all: epsfiles sample.pdf

epsfiles:
	@for i in $(EPSDIR) ; do \
	  cd $$i ; \
	  echo "Making $$i epsfiles" ; \
	  $(MAKE) ; \
	  cd .. ; \
	done

sample.pdf: sample.dvi
	$(RM) sample.pdf
	$(DVI2PDF) sample.dvi

sample.dvi: sample.tex
	$(JLATEX) sample.tex
	$(JLATEX) sample.tex

install: $(PSDIR)/sample.ps

$(PSDIR)/sample.ps: sample.ps
	@$(CP) sample.ps $(PSDIR)/sample.ps

clean: clean.local clean.dir

clean.local:
	$(RM) *~ *.aux *.dvi *.idx *.log *.toc *.ps *.pdf *.exe *.out

clean.dir:
	$(RM) */*~ */*.aux */*.eps */*.pdf */*.exe */*.out */*.obj
