.SUFFIXES:
.SUFFIXES: .sgml .gif .fig

.fig.gif:
	fig2dev -L gif $< $@ 

all:	guide_html

SGML_FILES = guide.sgml mgacore-api.sgml mgacodec-api.sgml mgabes-api.sgml mgagrab-api.sgml
FIGS = mgacore.fig
GIF_FIGS = mgacore.gif

guide_html: $(SGML_FILES) $(GIF_FIGS)
	db2html guide.sgml
	cp $(GIF_FIGS) guide

mgacore-api.sgml:	../mgacore.c ../mgacore.h
	./gendocs.sh -o $@ $^

mgacodec-api.sgml:	../mgacodec.c ../mgacodec.h 
	./gendocs.sh -o $@ $^

mgabes-api.sgml:	../mgabes.c ../mgabes.h
	./gendocs.sh -o $@ $^

mgagrab-api.sgml:	../mgagrab.c ../mgagrab.h
	./gendocs.sh -o $@ $^
