################################################################ # [LibML - Machine Learning Library] # http://libml.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: # Matthieu LAGACHERIE # E-mail : matthieu@libml.org # Olivier RICORDEAU # E-mail : olivier@libml.org ################################################################ # # (* variables.Makefile.in *) # # # This file is the center of LibML's compilation system. It contains all # the sources paths, and is include in each Makefile of the project. It # enables to recursively perform `make' operations in the LibbNN sources # set, such as `make all', `make clean', `make doc', etc. # # NB: This file is highly inspired from # the "sample Makefile for Objective Caml" file # by Jean-Christophe FILLIATRE # http://www.lri.fr/~filliatr/ftp/ocaml/misc/Makefile.in # NAME = libml SUBDIRS = misc \ networks \ init \ input \ error \ propagate \ learn \ xml # sources, directory by directory. # misc/ #subdirectory name MISC_DIR = misc # name of the compiled bytecode .cma lib (without path!) MISC_CMA = lib$(MISC_DIR).cma # name of the compiled bytecode .cma lib (with path!) MISC_CMA_LIB = $(MISC_DIR)/lib$(MISC_DIR).cma # .ml sources (without paths!) MISC_ML = pattern.ml \ corpus.ml \ env.ml \ defaultVisitor.ml \ common.ml # .mli sources (without paths!) MISC_MLI = pattern.mli \ corpus.mli \ defaultVisitor.mli \ env.mli \ common.mli # .mli sources (with paths!) MISC_MLI_INSTALL = $(MISC_MLI: = $(MISC_DIR)/) # compiled native code .cmx files (without path!) MISC_CMX = $(MISC_ML:.ml=.cmx) # compiled native code .cmx files (with path!) MISC_CMX_LIB = $(MISC_CMX: = $(MISC_DIR)/) # compiled interfaces .cmi files (without path!) MISC_CMI = $(MISC_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) MISC_CMI_INSTALL = $(MISC_CMI: = $(MISC_DIR)/) # networks/ #subdirectory name NETWORKS_DIR = networks # name of the compiled bytecode .cma lib (without path!) NETWORKS_CMA = lib$(NETWORKS_DIR).cma # name of the compiled bytecode .cma lib (with path!) NETWORKS_CMA_LIB = $(NETWORKS_DIR)/lib$(NETWORKS_DIR).cma # .ml sources (without paths!) NETWORKS_ML = nn.ml \ mlpNN.ml \ tdNN.ml # .mli sources (without paths!) NETWORKS_MLI = nn.mli \ mlpNN.mli \ tdNN.mli # .mli sources (with paths!) NETWORKS_MLI_INSTALL = $(NETWORKS_MLI: = $(NETWORKS_DIR)/) # compiled native code .cmx files (without path!) NETWORKS_CMX = $(NETWORKS_ML:.ml=.cmx) # compiled native code .cmx files (with path!) NETWORKS_CMX_LIB = $(NETWORKS_CMX: = $(NETWORKS_DIR)/) # compiled interfaces .cmi files (without path!) NETWORKS_CMI = $(NETWORKS_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) NETWORKS_CMI_INSTALL = $(NETWORKS_CMI: = $(NETWORKS_DIR)/) # init/ #subdirectory name INIT_DIR = init # name of the compiled bytecode .cma lib (without path!) INIT_CMA = lib$(INIT_DIR).cma # name of the compiled bytecode .cma lib (with path!) INIT_CMA_LIB = $(INIT_DIR)/lib$(INIT_DIR).cma # .ml sources (without paths!) INIT_ML = initVisitor.ml \ initMlpnnVisitor.ml \ initTdnnVisitor.ml # .mli sources (without paths!) INIT_MLI = initVisitor.mli # .mli sources (with paths!) INIT_MLI_INSTALL = $(INIT_MLI: = $(INIT_DIR)/) # compiled native code .cmx files (without path!) INIT_CMX = $(INIT_ML:.ml=.cmx) # compiled native code .cmx files (with path!) INIT_CMX_LIB = $(INIT_CMX: = $(INIT_DIR)/) # compiled interfaces .cmi files (without path!) INIT_CMI = $(INIT_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) INIT_CMI_INSTALL = $(INIT_CMI: = $(INIT_DIR)/) # input/ #subdirectory name INPUT_DIR = input # name of the compiled bytecode .cma lib (without path!) INPUT_CMA = lib$(INPUT_DIR).cma # name of the compiled bytecode .cma lib (with path!) INPUT_CMA_LIB = $(INPUT_DIR)/lib$(INPUT_DIR).cma # .ml sources (without paths!) INPUT_ML = inputVisitor.ml \ inputMlpnnVisitor.ml \ inputTdnnVisitor.ml # .mli sources (without paths!) INPUT_MLI = inputVisitor.mli # .mli sources (with paths!) INPUT_MLI_INSTALL = $(INPUT_MLI: = $(INPUT_DIR)/) # compiled native code .cmx files (without path!) INPUT_CMX = $(INPUT_ML:.ml=.cmx) # compiled native code .cmx files (with path!) INPUT_CMX_LIB = $(INPUT_CMX: = $(INPUT_DIR)/) # compiled interfaces .cmi files (without path!) INPUT_CMI = $(INPUT_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) INPUT_CMI_INSTALL = $(INPUT_CMI: = $(INPUT_DIR)/) # error/ #subdirectory name ERROR_DIR = error # name of the compiled bytecode .cma lib (without path!) ERROR_CMA = lib$(ERROR_DIR).cma # name of the compiled bytecode .cma lib (with path!) ERROR_CMA_LIB = $(ERROR_DIR)/lib$(ERROR_DIR).cma # .ml sources (without paths!) ERROR_ML = errorVisitor.ml \ errorMlpnnVisitor.ml \ errorTdnnVisitor.ml # .mli sources (without paths!) ERROR_MLI = errorVisitor.mli # .mli sources (with paths!) ERROR_MLI_INSTALL = $(ERROR_MLI: = $(ERROR_DIR)/) # compiled native code .cmx files (without path!) ERROR_CMX = $(ERROR_ML:.ml=.cmx) # compiled native code .cmx files (with path!) ERROR_CMX_LIB = $(ERROR_CMX: = $(ERROR_DIR)/) # compiled interfaces .cmi files (without path!) ERROR_CMI = $(ERROR_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) ERROR_CMI_INSTALL = $(ERROR_CMI: = $(ERROR_DIR)/) # propagate/ #subdirectory name PROPAGATE_DIR = propagate # name of the compiled bytecode .cma lib (without path!) PROPAGATE_CMA = lib$(PROPAGATE_DIR).cma # name of the compiled bytecode .cma lib (with path!) PROPAGATE_CMA_LIB = $(PROPAGATE_DIR)/lib$(PROPAGATE_DIR).cma # .ml sources (without paths!) PROPAGATE_ML = propagateVisitor.ml \ backpropVisitor.ml \ propagateMlpnnVisitor.ml \ propagateTdnnVisitor.ml # .mli sources (without paths!) PROPAGATE_MLI = # .mli sources (with paths!) PROPAGATE_MLI_INSTALL = $(PROPAGATE_MLI: = $(PROPAGATE_DIR)/) # compiled native code .cmx files (without path!) PROPAGATE_CMX = $(PROPAGATE_ML:.ml=.cmx) # compiled native code .cmx files (with path!) PROPAGATE_CMX_LIB = $(PROPAGATE_CMX: = $(PROPAGATE_DIR)/) # compiled interfaces .cmi files (without path!) PROPAGATE_CMI = $(PROPAGATE_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) PROPAGATE_CMI_INSTALL = $(PROPAGATE_CMI: = $(PROPAGATE_DIR)/) # learn/ #subdirectory name LEARN_DIR = learn # name of the compiled bytecode .cma lib (without path!) LEARN_CMA = lib$(LEARN_DIR).cma # name of the compiled bytecode .cma lib (with path!) LEARN_CMA_LIB = $(LEARN_DIR)/lib$(LEARN_DIR).cma # .ml sources (without paths!) LEARN_ML = learnVisitor.ml \ learnMlpnnEnhancedBackpropVisitor.ml \ learnMlpnnWeightDecayVisitor.ml \ learnMlpnnStochVisitor.ml \ learnTdnnStochVisitor.ml # .mli sources (without paths!) LEARN_MLI = # .mli sources (with paths!) LEARN_MLI_INSTALL = $(LEARN_MLI: = $(LEARN_DIR)/) # compiled native code .cmx files (without path!) LEARN_CMX = $(LEARN_ML:.ml=.cmx) # compiled native code .cmx files (with path!) LEARN_CMX_LIB = $(LEARN_CMX: = $(LEARN_DIR)/) # compiled interfaces .cmi files (without path!) LEARN_CMI = $(LEARN_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) LEARN_CMI_INSTALL = $(LEARN_CMI: = $(LEARN_DIR)/) # xml/ #subdirectory name XML_DIR = xml # name of the compiled bytecode .cma lib (without path!) XML_CMA = lib$(XML_DIR).cma # name of the compiled bytecode .cma lib (with path!) XML_CMA_LIB = $(XML_DIR)/lib$(XML_DIR).cma # .ml sources (without paths!) XML_ML = xmlVisitor.ml \ xmlMlpnnVisitor.ml \ xmlTdnnVisitor.ml # .mli sources (without paths!) XML_MLI = xmlVisitor.mli \ xmlMlpnnVisitor.mli \ xmlTdnnVisitor.mli # .mli sources (with paths!) XML_MLI_INSTALL = $(XML_MLI: = $(XML_DIR)/) # compiled native code .cmx files (without path!) XML_CMX = $(XML_ML:.ml=.cmx) # compiled native code .cmx files (with path!) XML_CMX_LIB = $(XML_CMX: = $(XML_DIR)/) # compiled interfaces .cmi files (without path!) XML_CMI = $(XML_MLI:.mli=.cmi) # compiled interfaces .cmi files (with path!) XML_CMI_INSTALL = $(XML_CMI: = $(XML_DIR)/) # (* Libraries compilation *) # all .cma files required for the libml.cma bytecode lib. ALL_CMA_LIB = $(MISC_CMA_LIB) \ $(NETWORKS_CMA_LIB) \ $(INIT_CMA_LIB) \ $(INPUT_CMA_LIB) \ $(ERROR_CMA_LIB) \ $(PROPAGATE_CMA_LIB) \ $(LEARN_CMA_LIB) \ $(XML_CMA_LIB) # all .cmx files required for the libml.cmxa native code lib. ALL_CMX_LIB = misc/pattern.cmx \ misc/corpus.cmx \ misc/env.cmx \ misc/defaultVisitor.cmx \ misc/common.cmx \ networks/nn.cmx \ networks/mlpNN.cmx \ networks/tdNN.cmx \ init/initVisitor.cmx \ init/initMlpnnVisitor.cmx \ init/initTdnnVisitor.cmx \ input/inputVisitor.cmx \ input/inputMlpnnVisitor.cmx \ input/inputTdnnVisitor.cmx \ error/errorVisitor.cmx \ error/errorMlpnnVisitor.cmx \ error/errorTdnnVisitor.cmx \ propagate/propagateVisitor.cmx \ propagate/backpropVisitor.cmx \ propagate/propagateMlpnnVisitor.cmx \ propagate/propagateTdnnVisitor.cmx \ learn/learnVisitor.cmx \ learn/learnMlpnnEnhancedBackpropVisitor.cmx \ learn/learnMlpnnWeightDecayVisitor.cmx \ learn/learnMlpnnStochVisitor.cmx \ learn/learnTdnnStochVisitor.cmx \ xml/xmlVisitor.cmx \ xml/xmlTdnnVisitor.cmx \ xml/xmlMlpnnVisitor.cmx # all .o files required for the libml.a C lib. ALL_O_LIB = $(ALL_CMX_LIB:.cmx=.o) # (* Installation *) ALL_CMX_INSTALL = $(ALL_CMX_LIB) ALL_CMI_INSTALL = $(MISC_CMI_INSTALL) \ $(NETWORKS_CMI_INSTALL) \ $(INIT_CMI_INSTALL) \ $(INPUT_CMI_INSTALL) \ $(ERROR_CMI_INSTALL) \ $(PROPAGATE_CMI_INSTALL) \ $(LEARN_CMI_INSTALL) \ $(XML_CMI_INSTALL) ALL_MLI_INSTALL = $(MISC_MLI_INSTALL) \ $(NETWORKS_MLI_INSTALL) \ $(INIT_MLI_INSTALL) \ $(INPUT_MLI_INSTALL) \ $(ERROR_MLI_INSTALL) \ $(PROPAGATE_MLI_INSTALL) \ $(LEARN_MLI_INSTALL) \ $(XML_MLI_INSTALL) # (* /Sources *) # where to install the binaries prefix=@prefix@ exec_prefix=@exec_prefix@ BINDIR=@bindir@ # where to install the man page MANDIR=@mandir@ # other variables set by ./configure OCAMLC = @OCAMLC@ OCAMLOPT = @OCAMLOPT@ OCAMLMKLIB = @OCAMLMKLIB@ OCAMLDEP = @OCAMLDEP@ OCAMLFIND = @OCAMLFIND@ OCAMLFINDPATH = @OCAMLFINDPATH@ PXPPATH = @PXPPATH@ PXPLEXPATH = @PXPLEXPATH@ OCAMLLEX = @OCAMLLEX@ OCAMLYACC= @OCAMLYACC@ OCAMLLIB = @OCAMLLIB@ OCAMLVERSION = @OCAMLVERSION@ OCAMLWEB = @OCAMLWEB@ OCAMLDOC = @OCAMLDOC@ OCAMLWIN32 = @OCAMLWIN32@ EXE = @EXE@ BYTE = @BYTE@ OPT = @OPT@ LATEX_HERE = @LATEX_HERE@ LATEX2HTML_HERE = @LATEX2HTML_HERE@ DVIPDF_HERE = @DVIPDF_HERE@ DVIPS_HERE = @DVIPS_HERE@ TEXI2HTML_HERE = @TEXI2HTML_HERE@ # General compilation flags. ############################ # bytecode BFLAGS = -g -w A # native code OFLAGS = -w A -compact # C objects CFLAGS = -w A -c -output-obj unix.cmxa # Flags for linking. #################### # bytecode BLFLAGS = -a # native code OLFLAGS = -lml -L/usr/local/libml RM = rm -f TMP = /tmp/$(NAME)-build DOC_INSTALL_PATH = /usr/share/doc/$(NAME) # Variable dependent generic rules. ################################### .SUFFIXES: .mli .ml .cmi .cmo .cmx .mll .mly .tex .dvi .ps .html .mli.cmi: @echo " + building $@ ..." @$(OCAMLFIND) $(OCAMLC) -c $(BFLAGS) $< \ `if [ -f ./ocamlfind_options ]; then cat ./ocamlfind_options; fi` .ml.cmo: @echo " + building $@ ..." @$(OCAMLFIND) $(OCAMLC) -c $(BFLAGS) $< \ `if [ -f ./ocamlfind_options ]; then cat ./ocamlfind_options; fi` .ml.o: @echo " + building $@ ..." @$(OCAMLFIND) $(OCAMLOPT) $(CFLAGS) $< \ `if [ -f ./ocamlfind_options ]; then cat ./ocamlfind_options; fi` .ml.cmx: @echo " + building $@ ..." @$(OCAMLFIND) $(OCAMLOPT) -c $(OFLAGS) $< \ `if [ -f ./ocamlfind_options ]; then cat ./ocamlfind_options; fi`