
##----------------------------------------------------------##
##                                                          ##
##  Universal Makefile Documentation Function               ##
##                                                          ##
##  Created : Wei Liu 07/06/30                              ##
##  Revision: [Last]Wei Liu 07/07/07                        ##
##                                                          ##
##----------------------------------------------------------##

VER_STR           ?= 9.0
DOXYGEN_DOC_PATH  := /usr/local/include/doc


define PREPARE_DOXYGEN
sed 's/MODULE/$(MODULE)/g' $(1) | sed 's/VER_STR/$(VER_STR)/g' >> ./doc/doxygen.conf
endef

define MAKE_DOC
@echo
@echo -e "Generate documnet of $(MODULE)\t\t\t Please Waiting..."
@$(call PREPARE_DOXYGEN, $(DOXYGEN_DOC_PATH)/doxygen.conf)
@doxygen ./doc/doxygen.conf
@cp -rf $(DOXYGEN_DOC_PATH)/view_chm.bat ./doc/html
@echo
@echo ==================================Doxygen End===================================
endef

