################################################################### # [LibNN - Neural Networks Library] # http://libnn.org # Copyright (C) 2002 - 2003 LAGACHERIE Matthieu RICORDEAU Olivier # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. This # program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. You should have # received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. # # SPECIAL NOTE (the beerware clause): # This software is free software. However, it also falls under the beerware # special category. That is, if you find this software useful, or use it # every day, or want to grant us for our modest contribution to the # free software community, feel free to send us a beer from one of # your local brewery. Our preference goes to Belgium abbey beers and # irish stout (Guiness for strength!), but we like to try new stuffs. # # Authors: # LAGACHERIE Matthieu # Paper mail : 7 rue Delescluzes 94280 LE KREMLIN BICETRE, FRANCE # E-mail : matthieu@libnn.org # # RICORDEAU Olivier # Paper mail : 69 avenue d'Italie 75013 PARIS, FRANCE # E-mail : olivier@libnn.org # ################################################################### include ../common.Makefile # main target ############# all: $(BYTE) $(OPT) # Recompiles everything from scratch re: clean all # bytecode and native-code compilation ###################################### NAME = $(SUBDIR_NAME_DIR) # main targets: ML = $(SUBDIR_NAME_ML) MLI = $(SUBDIR_NAME_MLI) CMI = $(MLI:.mli=.cmi) CMO = $(ML:.ml=.cmo) $(BYTE): lib$(NAME).cma $(OPT): $(SUBDIR_NAME_CMX) lib$(NAME).cma: $(CMO) $(OCAMLC) $^ $(BFLAGS) $(BLFLAGS) -o $@ # documentation ############### DOCPATH = ../doc PDF = $(DOCPATH)/pdf/lib$(NAME)_code_documentation.pdf PS = $(DOCPATH)/ps/lib$(NAME)_code_documentation.ps LATEX_SHORT = lib$(NAME)_code_documentation.tex LATEX = $(DOCPATH)/latex/$(LATEX_SHORT) DVI_SHORT = lib$(NAME)_code_documentation.dvi DVI = $(DOCPATH)/dvi/$(DVI_SHORT) TEXI_SHORT = lib$(NAME)_code_documentation.texi TEXI = $(DOCPATH)/texi/$(TEXI_SHORT) TEXI2HTML = $(DOCPATH)/texi2html/lib$(NAME)_code_documentation.html MAN_PATH = $(DOCPATH)/man/$(SUBDIR_NAME_DIR) HTML_PATH = $(DOCPATH)/html/$(SUBDIR_NAME_DIR) $(LATEX): $(ML) $(MLI) @echo " + making latex in $(SUBDIR_NAME_DIR) ..." export TEXINPUTS="/usr/lib/ocaml/ocamldoc/" ; \ $(OCAMLDOC) $(INCLUDES) -o $(LATEX) -latex \ -t 'lib$(NAME) code documentation' \ $(ML) $(MLI) $(DVI): $(LATEX) @echo " + making dvi in $(SUBDIR_NAME_DIR) ..." ( cp $(LATEX) $(TMP); \ cd $(TMP); \ latex $(LATEX_SHORT); \ latex $(LATEX_SHORT); \ cd -; \ cp $(TMP)/$(DVI_SHORT) $(DVI) ) $(PDF): $(DVI) @echo " + making pdf in $(SUBDIR_NAME_DIR)..." dvipdf $(DVI) $(PDF) $(PS): $(DVI) @echo " + making ps in $(SUBDIR_NAME_DIR) ..." dvips $(DVI) -o $(PS) $(TEXI): $(ML) $(MLI) @echo " + making texi in $(SUBDIR_NAME_DIR) ..." export TEXINPUTS="/usr/lib/ocaml/ocamldoc/" ; \ $(OCAMLDOC) $(INCLUDES) -texi -o $(TEXI) \ -t 'lib$(NAME) code documentation' $(ML) $(MLI) TEXI2HTML_PATH = $(DOCPATH)/texi2html/ $(TEXI2HTML): $(TEXI) @echo " + making texi2html in $(SUBDIR_NAME_DIR) ..." (cp $(TEXI) $(TEXI2HTML_PATH) && \ cd $(TEXI2HTML_PATH) && \ texi2html -glossary -menu -number $(TEXI_SHORT) && \ $(RM) $(TEXI_SHORT)) html-generation: $(ML) $(MLI) @echo " + making html-generation in $(SUBDIR_NAME_DIR) ..." export TEXINPUTS="/usr/lib/ocaml/ocamldoc/" ; \ $(OCAMLDOC) $(INCLUDES) -html -d $(HTML_PATH) -all-params \ -colorize-code -t 'lib$(NAME) code documentation' $(ML) $(MLI) man-generation: $(ML) $(MLI) @echo " + making man-generation in $(SUBDIR_NAME_DIR) ..." export TEXINPUTS="/usr/lib/ocaml/ocamldoc/" ; \ $(OCAMLDOC) $(INCLUDES) -man -d $(MAN_PATH) -man-mini \ -t 'lib$(NAME) code documentation' $(ML) $(MLI) $(OCAMLDOC): man-generation html-generation $(TEXI) $(LATEX) $(LATEX_HERE): $(DVI) $(DVIPDF_HERE): $(PDF) $(DVIPS_HERE): $(PS) $(TEXI2HTML_HERE): $(TEXI2HTML) # 'make doc' generates as much documentation as possibe, depending on latex, # dvips, dvipdf, texi2html and ocamldoc's presence. doc: $(CMO) $(OCAMLDOC) $(LATEX_HERE) $(DVIPS_HERE) $(DVIPDF_HERE) $(TEXI2HTML_HERE) # clean ####### clean:: doc-clean @echo " + cleaning $(SUBDIR_NAME_DIR) ..." $(RM) *.cm[iox] *.o *~ \#* $(RM) lib$(NAME).cma doc-clean: @echo " + cleaning doc in $(SUBDIR_NAME_DIR) ..." $(RM) $(PDF) \ $(PS) \ $(LATEX) \ $(DVI) \ $(TEXI) \ $(MAN_PATH)/*.o \ $(HTML_PATH)/{*.html,*.css} \ $(TEXI2HTML_PATH)/*.html dist-clean distclean:: clean