#
#       Makefile for gokuraku/append
#

include ../../../Mkinclude

LIBOBJS		= sgfont
EPSFILES	= sgfont.eps

GIFFILES	= sgfont.gif

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

all: mkobj $(EPSFILES) rmobj

mkobj: $(LIBOBJS)

rmobj:
	$(RM) $(LIBOBJS)

sgfont.eps:
	(echo -2; echo 1) | sgfont -sw:fname=sgfont -sg:lcorner=.false.
	sed "s/Box: 31 43 563 795/Box: 31 153 563 685/" \
		sgfont.ps > sgfont.eps
	$(RM) sgfont.ps


html: $(HTML) $(GIFFILES) rmobj

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

sgfont.gif: sgfont.f
	$(MAKE) sgfont
	(echo 1; echo 1) | ./sgfont -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

