#
#       Makefile for gokuraku/step
#

include ../../../Mkinclude

LIBOBJS		= step1     step2
EPSFILES	= step1.eps step2.eps

GIFFILES	= step1.gif step2.gif

LIBNAME		= step
L2HFLAGS	= refdir=.. curdir=step backto=../gokuraku.html \
		  auxin=../gokuraku.haux
TEXDOC		= step.tex 
HTML		= step.html 


all: mkobj $(EPSFILES) rmobj

mkobj: $(LIBOBJS)

rmobj:
	$(RM) $(LIBOBJS)

step1.eps:
	echo 2 | step1 -sw:fname=step1
	$(LBINDIR)/sgksrot step1.ps > step1.eps
	$(RM) step1.ps

step2.eps:
	echo 2 | step2 -sw:fname=step2
	$(LBINDIR)/sgksrot step2.ps > step2.eps
	$(RM) step2.ps

html: $(HTML) $(GIFFILES) rmobj

clean.html: 
	$(RM) $(HTML) $(GIFFILES)

step1.gif: step1.f
	$(MAKE) step1
	echo 1 | ./step1 -sg:lcorner=.false. \
	-sw:iwidth=$(GIFWIDTH) -sw:iheight=$(GIFHEIGHT) \
	-sw:iposx=$(GIFPOSX) -sw:iposy=$(GIFPOSY) \
        -sw:ldump=.true. -sw:lwait=.false. -sw:lwait1=.false. 
	$(XWD2PPM) dcl_001.xwd | $(PPM2GIF) >$@
	$(RM) dcl_001.xwd

step2.gif: step2.f
	$(MAKE) step2
	echo 1 | ./step2 -sg:lcorner=.false. \
	-sw:iwidth=$(GIFWIDTH) -sw:iheight=$(GIFHEIGHT) \
	-sw:iposx=$(GIFPOSX) -sw:iposy=$(GIFPOSY) \
        -sw:ldump=.true. -sw:lwait=.false. -sw:lwait1=.false. 
	$(XWD2PPM) dcl_001.xwd | $(PPM2GIF) >$@
	$(RM) dcl_001.xwd


