include ../../Defines.h

PAGES = Scheduler.html SynchronousViewController.html\
 WernerScheduler.html

%.html: %.borg ../rtf2html
	@echo "<html><body text="#000000" bgcolor="#CCFF99"><title>" >$@
	@echo $< "</title><h1>" >>$@
	@echo $< "</h1><br><pre>" >>$@
	@../rtf2html $< | sed -e s/"\`".*/'<b>'\&'<\/b>'/ >>$@
	@echo "</pre></body></html>" >>$@

../rtf2html: 
	@cd ..; $(MAKE) rtf2html
	
doc: $(PAGES)

all: kcborg hcborg WebRequest.borg WebDispatcher.borg cborg.agent.boot\
	cborg.uiagent.boot
	@cd ../..; $(MAKE) hcborg

hcborg: 
	@cd ../..; $(MAKE) hcborg
	@ln -s ../../hcborg hcborg

kcborg:
	@cd ../..; $(MAKE) kcborg
	@ln -s ../../kcborg kcborg

%.boot: 
	@ln -s ../../config/$@ $@

%.borg: 
	@ln -s ../../hborg/$@ $@


clean: 
	@rm -f $(PAGES)

very-clean: clean
	@rm -f WebRequest.borg WebDispatcher.borg kcborg hcborg 
	@rm -f cborg.agent.boot cborg.uiagent.boot
	@rm -f *~ borg.*.log cborg.*.log cborg.log
	@rm -f *~ rtf2txt *.log gmon.out *.autosave.cborg rtf2html a.out
