#
#       Makefile for rakuraku
#

include ../../Mkinclude

EPSDIR          = append kihon1 kihon2 layout map3d miss  \
                  quick  u2d1   u2d2   uspack uxyz1 uxyz2 \
                  paint  color


all: epsfiles rakuraku.pdf

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

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

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

install: $(PSDIR)/rakuraku.ps

$(PSDIR)/rakuraku.ps: rakuraku.ps
	@$(CP) rakuraku.ps $(PSDIR)/rakuraku.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
