1 |
|
################################################################### |
2 |
|
#[LibNN - Neural Networks Library] |
3 |
|
#Copyright (C) 2002 - 2003 LAGACHERIE Matthieu RICORDEAU Olivier |
4 |
# |
# |
5 |
# sample Makefile for Objective Caml |
#This program is free software; you can redistribute it and/or |
6 |
# Copyright (C) 2001 Jean-Christophe FILLIATRE |
#modify it under the terms of the GNU General Public License |
7 |
|
#as published by the Free Software Foundation; either version 2 |
8 |
|
#of the License, or (at your option) any later version. This |
9 |
|
#program is distributed in the hope that it will be useful, |
10 |
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
|
#GNU General Public License for more details. You should have |
13 |
|
#received a copy of the GNU General Public License |
14 |
|
#along with this program; if not, write to the Free Software |
15 |
|
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
16 |
|
#USA. |
17 |
# |
# |
18 |
# This library is free software; you can redistribute it and/or |
#Author: |
19 |
# modify it under the terms of the GNU Library General Public |
#LAGACHERIE Matthieu |
20 |
# License version 2, as published by the Free Software Foundation. |
#Paper mail : 7 rue Delescluzes 94280 LE KREMLIN BICETRE, FRANCE |
21 |
# |
#E-mail : matthieu@marvinproject.org |
22 |
# This library is distributed in the hope that it will be useful, |
# |
23 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
#RICORDEAU Olivier |
24 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
#Paper mail : 69 avenue d'Italie 75013 PARIS, FRANCE |
25 |
|
#E-mail : olivier@marvinproject.org |
26 |
|
# |
27 |
|
################################################################### |
28 |
|
|
29 |
|
# |
30 |
|
#NB: This file is highly inspired from |
31 |
|
#the "sample Makefile for Objective Caml" file |
32 |
|
#by Jean-Christophe FILLIATRE |
33 |
|
#http://www.lri.fr/~filliatr/ftp/ocaml/misc/Makefile.in |
34 |
# |
# |
|
# See the GNU Library General Public License version 2 for more details |
|
|
# (enclosed in the file LGPL). |
|
35 |
|
|
36 |
# where to install the binaries |
# where to install the binaries |
37 |
prefix=@prefix@ |
prefix=@prefix@ |
51 |
OCAMLBEST= @OCAMLBEST@ |
OCAMLBEST= @OCAMLBEST@ |
52 |
OCAMLVERSION = @OCAMLVERSION@ |
OCAMLVERSION = @OCAMLVERSION@ |
53 |
OCAMLWEB = @OCAMLWEB@ |
OCAMLWEB = @OCAMLWEB@ |
54 |
|
OCAMLDOC = @OCAMLDOC@ |
55 |
OCAMLWIN32 = @OCAMLWIN32@ |
OCAMLWIN32 = @OCAMLWIN32@ |
56 |
EXE = @EXE@ |
EXE = @EXE@ |
57 |
|
|
59 |
BFLAGS = -g $(INCLUDES) |
BFLAGS = -g $(INCLUDES) |
60 |
OFLAGS = $(INCLUDES) |
OFLAGS = $(INCLUDES) |
61 |
|
|
62 |
|
RM = rm -f |
63 |
|
TMP = /tmp |
64 |
|
|
65 |
# main target |
# main target |
66 |
############# |
############# |
67 |
|
|
123 |
# documentation |
# documentation |
124 |
############### |
############### |
125 |
|
|
126 |
# Will be done later |
DOCPATH = ../../doc/$(NAME) |
127 |
#doc: |
|
128 |
|
PDF=$(DOCPATH)/$(NAME)_code_documentation.pdf |
129 |
|
PS=$(DOCPATH)/$(NAME)_code_documentation.ps |
130 |
|
LATEX_SHORT=$(NAME)_code_documentation.tex |
131 |
|
LATEX=$(DOCPATH)/$(LATEX_SHORT) |
132 |
|
DVI_SHORT=$(NAME)_code_documentation.dvi |
133 |
|
DVI=$(DOCPATH)/$(DVI_SHORT) |
134 |
|
HTML=$(DOCPATH)/$(NAME)_code_documentation.html |
135 |
|
TEXI=$(DOCPATH)/$(NAME)_code_documentation.texi |
136 |
|
|
137 |
|
$(LATEX): $(ML) $(MLI) |
138 |
|
$(OCAMLDOC) -o $(LATEX) -v -latex -t '$(NAME) code documentation' $(ML) $(MLI) |
139 |
|
|
140 |
|
$(DVI): $(LATEX) |
141 |
|
cp $(LATEX) $(TMP); \ |
142 |
|
cd $(TMP) \ |
143 |
|
; latex $(LATEX_SHORT); \ |
144 |
|
cd -; \ |
145 |
|
cp $(TMP)/$(DVI_SHORT) $(DVI) |
146 |
|
|
147 |
|
$(PDF): $(DVI) |
148 |
|
dvipdf $(DVI) $(PDF) |
149 |
|
|
150 |
|
$(PS): $(DVI) |
151 |
|
dvips $(DVI) -o $(PS) |
152 |
|
|
153 |
|
$(TEXI): |
154 |
|
$(OCAMLDOC) -v -texi -o $(TEXI) -t '$(NAME) code documentation' $(ML) $(MLI) |
155 |
|
|
156 |
|
html-generation: |
157 |
|
$(OCAMLDOC) -v -html -d ../../doc/$(NAME)/html -t '$(NAME) code documentation' $(ML) $(MLI) |
158 |
|
|
159 |
|
man-generation: |
160 |
|
$(OCAMLDOC) -v -man -d $(DOCPATH)/man -t '$(NAME) code documentation' $(ML) $(MLI) |
161 |
|
|
162 |
|
$(HTML): html-generation |
163 |
|
ln -s $(DOCPATH)/html/index.html $(HTML) |
164 |
|
|
165 |
|
doc: man-generation $(TEXI) $(HTML) $(PS) $(PDF) |
166 |
|
|
167 |
# generic rules |
# generic rules |
168 |
############### |
############### |
214 |
# clean |
# clean |
215 |
####### |
####### |
216 |
|
|
217 |
clean:: |
clean:: doc-clean |
218 |
rm -f *.cm[iox] *.o *~ \#* |
$(RM) *.cm[iox] *.o *~ \#* |
219 |
rm -f $(GENERATED) |
$(RM) $(GENERATED) |
220 |
rm -f $(NAME).byte $(NAME).opt |
$(RM) $(NAME).byte $(NAME).opt |
221 |
|
|
222 |
|
doc-clean: |
223 |
|
$(RM) $(DOCPATH)/man/*.o \ |
224 |
|
$(TEXI) \ |
225 |
|
$(HTML) \ |
226 |
|
$(PS) \ |
227 |
|
$(PDF) \ |
228 |
|
$(LATEX) \ |
229 |
|
$(DOCPATH)/$(DVI) \ |
230 |
|
$(RM) $(TMP)/{$(LATEX_SHORT),$(DVI_SHORT),*.log,*.aux,*.toc} |
231 |
|
$(RM) $(DOCPATH)/html/{*.html,*.css} |
232 |
|
|
233 |
dist-clean distclean:: clean |
dist-clean distclean:: clean doc-clean |
234 |
rm -f Makefile config.cache config.log config.status |
$(RM) Makefile config.cache config.log config.status |
235 |
|
|
236 |
# depend |
# depend |
237 |
######## |
######## |
238 |
|
|
239 |
.depend depend:: $(GENERATED) |
.depend depend:: $(GENERATED) |
240 |
rm -f .depend |
$(RM) .depend |
241 |
$(OCAMLDEP) $(INCLUDES) *.ml *.mli > .depend |
$(OCAMLDEP) $(INCLUDES) *.ml *.mli > .depend |
242 |
|
|
243 |
include .depend |
include .depend |