# 山玛: arare 脱 Makefile
#
# 旺悟: 2003-02-05 岿怀固办席
#     : 2005-01-27 井光赖惶
#     : 2005-04-22 岿怀固办席
#     : 2005-04-26 井光赖惶
#     : 2006-03-19 岿怀固办席

include ./Mkinclude

OBJECTS = INSTALL.htm HOWTOUSE.htm
DOCSUBDIR = $(SRCDIR) $(DOCDIR) 

all: 
	cd $(SRCDIR) ; $(MAKE) all


doc: $(OBJECTS)
	@for dir in $(DOCSUBDIR) ; do \
	  cd $$dir ; \
	  $(MAKE) doc ; \
	  cd ../ ; \
	done

latex2html: 
	@for dir in $(DOCDIR) ; do \
	  cd $$dir ; \
	  $(MAKE) latex2html ; \
	  cd ../ ; \
	done


$(OBJECTS): %.htm : %.rd
	$(RD2HTML) $<  > $@


clean.all: clean clean.doc clean.latex2html

clean.doc: 
	cd $(DOCDIR) ; $(MAKE) clean.doc ; cd ../
	$(RM) $(OBJECTS) 

clean.latex2html:
	cd $(DOCDIR) ; $(MAKE) clean.latex2html ; cd ../
	$(RM) $(OBJECTS) 

clean:
	cd $(SRCDIR); $(MAKE) clean ; cd ../
	$(RM) $(LIBDIR)/*.a
	$(RM) $(MODDIR)/*.mod
	$(RM) $(BINDIR)/arare



