Salome HOME
ed7de656f1d35e01e21f9032f402ca66db11a509
[tools/medcoupling.git] / doc / MEDMEM / Makefile.in
1 # Copyright (C) 2005  OPEN CASCADE, CEA, EDF R&D, LEG
2 #           PRINCIPIA R&D, EADS CCR, Lip6, BV, CEDRAT
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either 
6 # version 2.1 of the License.
7
8 # This library is distributed in the hope that it will be useful 
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 # Lesser General Public License for more details.
12
13 # You should have received a copy of the GNU Lesser General Public  
14 # License along with this library; if not, write to the Free Software 
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
19 # -* Makefile *- 
20 #
21 # Author : Nadir BOUHAMOU (CEA)
22 #
23
24 # source path
25 top_srcdir=@top_srcdir@
26 top_builddir=../..
27 srcdir=@srcdir@
28 VPATH=.:@srcdir@
29 doxygen=@DOXYGEN@
30
31 @COMMENCE@
32
33 # Executables targets
34 BIN = MESHgeneral MESHcoordinates MESHconnectivities MESHINGexample FIELDcreate FIELDgeneral MEDMEM_InvokingDriverByAttachingItToAnObject MEDMEM_InvokingDriverFromStandardObjectMethod MEDMEM_InvokingDriverAtObjectCreationTime 
35
36 LDFLAGS+= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome 
37 LDFLAGSFORBIN+= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome
38
39 CPPFLAGS+=$(MED2_INCLUDES) $(HDF5_INCLUDES)
40
41 CXXFLAGS+=@CXXTMPDPTHFLAGS@
42 #LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS)
43 # change motivated by the bug KERNEL4778.
44 LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lmedmem -lmed_V2_1 $(STDLIB)
45
46 #LDFLAGSFORBIN+=$(MED2_LIBS) $(HDF5_LIBS)
47 # change motivated by the bug KERNEL4778.
48 LDFLAGSFORBIN+=-lm $(MED2_LIBS) $(HDF5_LIBS) -lmedmem -lmed_V2_1
49
50 ifeq ($(MED_WITH_KERNEL),yes)
51   CPPFLAGS+= ${KERNEL_CXXFLAGS}
52   CXXFLAGS+= ${KERNEL_CXXFLAGS}
53   LDFLAGS+= ${KERNEL_LDFLAGS} -lSALOMELocalTrace 
54   LDFLAGSFORBIN+= ${KERNEL_LDFLAGS} -lSALOMELocalTrace -lSALOMEBasics
55 endif
56
57 LIBSFORBIN=
58
59 LIBS=
60
61 @CONCLUDE@
62
63 doc: .doxygen_user .doxygen_devel ps
64
65 ps: .doxygen_user .doxygen_devel MedMemory_user.ps MedMemory_devel.ps MEDMEM_UsersGuide.ps
66
67 ps_2on1: .doxygen_user .doxygen_devel MedMemory_user_2on1.ps MedMemory_devel_2on1.ps MEDMEM_UsersGuide_2on1.ps
68
69 pdf: .doxygen_user .doxygen_devel MedMemory_user.pdf MedMemory_devel.pdf MEDMEM_UsersGuide.pdf
70
71 pdf_2on1: .doxygen_user .doxygen_devel MedMemory_user_2on1.pdf MedMemory_devel_2on1.pdf MEDMEM_UsersGuide_2on1.pdf
72
73 # user doc :
74
75 .doxygen_user: $(top_srcdir)/src/MEDMEM/Doxyfile_med_user.in
76         cd $(top_builddir) ; ./config.status
77         cd $(top_builddir)/src/MEDMEM && $(doxygen) Doxyfile_med_user
78         touch $@
79         $(RM) -r doc_ref_user
80         ln -s $(top_builddir)/src/MEDMEM/doc_ref_user doc_ref_user
81
82 MedMemory_user.ps:
83         cd ./doc_ref_user/latex && $(MAKE) ps
84         cp -f ./doc_ref_user/latex/refman.ps $@
85
86 MedMemory_user_2on1.ps:
87         cd ./doc_ref_user/latex && $(MAKE) ps_2on1
88         cp -f ./doc_ref_user/latex/refman_2on1.ps $@
89
90 MedMemory_user.pdf:
91         cd ./doc_ref_user/latex && $(MAKE) pdf
92         cp -f ./doc_ref_user/latex/refman.pdf $@
93
94 MedMemory_user_2on1.pdf:
95         cd ./doc_ref_user/latex && $(MAKE) pdf_2on1
96         cp -f ./doc_ref_user/latex/refman_2on1.pdf $@
97
98 # developper doc
99
100 .doxygen_devel: $(top_srcdir)/src/MEDMEM/Doxyfile_med_devel.in
101         cd $(top_builddir) ; ./config.status
102         cd $(top_builddir)/src/MEDMEM && $(doxygen) Doxyfile_med_devel
103         touch $@
104         $(RM) -r doc_ref_devel
105         ln -s $(top_builddir)/src/MEDMEM/doc_ref_devel doc_ref_devel
106
107 MedMemory_devel.ps:
108         cd ./doc_ref_devel/latex && $(MAKE) ps
109         cp -f ./doc_ref_devel/latex/refman.ps $@
110
111 MedMemory_devel_2on1.ps:
112         cd ./doc_ref_devel/latex && $(MAKE) ps_2on1
113         cp -f ./doc_ref_devel/latex/refman_2on1.ps $@
114
115 MedMemory_devel.pdf:
116         cd ./doc_ref_devel/latex && $(MAKE) pdf
117         cp -f ./doc_ref_devel/latex/refman.pdf $@
118
119 MedMemory_devel_2on1.pdf:
120         cd ./doc_ref_devel/latex && $(MAKE) pdf_2on1
121         cp -f ./doc_ref_devel/latex/refman_2on1.pdf $@
122
123 # User Guide
124
125 MEDMEM_UsersGuide.ps: MEDMEM_UsersGuide.pdf
126         pdf2ps MEDMEM_UsersGuide.pdf MEDMEM_UsersGuide.ps 
127
128 MEDMEM_UsersGuide_2on1.ps: MEDMEM_UsersGuide.ps
129         psnup -2 MEDMEM_UsersGuide.ps >MEDMEM_UsersGuide_2on1.ps
130
131 MEDMEM_UsersGuide_2on1.pdf: MEDMEM_UsersGuide_2on1.ps
132         ps2pdf MEDMEM_UsersGuide_2on1.ps MEDMEM_UsersGuide_2on1.pdf
133
134 MEDMEM_UsersGuide.pdf: MEDMEM_UsersGuide.tex MEDMEM_Content.tex MEDMEM_UML_light.png MEDMEM_UML.png FIELDcreate.cxx FIELDgeneral.cxx MEDMEM_InvokingDriverAtObjectCreationTime.cxx MEDMEM_InvokingDriverByAttachingItToAnObject.cxx MEDMEM_InvokingDriverFromStandardObjectMethod.cxx MEDMEM_MedAddingAnExistingObject.cxx MESHconnectivities.cxx MESHcoordinates.cxx MESHgeneral.cxx MESHINGexample.cxx FIELDcreate.py FIELDgeneral.py MEDMEM_InvokingDriverAtObjectCreationTime.py MEDMEM_InvokingDriverByAttachingItToAnObject.py MEDMEM_InvokingDriverFromStandardObjectMethod.py MESHconnectivities.py MESHcoordinates.py MESHgeneral.py MESHINGexample.py
135         echo "Running pdflatex..."
136         pdflatex $<
137         #echo "Running makeindex..."
138         #makeindex MEDMEM_UsersGuide.idx
139         echo "Rerunning latex...."
140         pdflatex $<
141         latex_count=5
142         while egrep -s 'Rerun (LaTeX|to get cross-references right)' MEDMEM_UsersGuide.log && [ $latex_count -gt 0 ] ;\
143             do \
144               echo "Rerunning latex...." ;\
145               latex $< ;\
146               latex_count=`expr $latex_count - 1` ;\
147             done
148
149 MEDMEM_UsersGuide.tex:MEDMEM_UsersGuide.tex.in
150         cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_UsersGuide.tex ./config.status
151
152 MEDMEM_Content.tex:MEDMEM_Content.tex.in
153         cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_Content.tex ./config.status 
154
155 MEDMEM_UML_light.png:MEDMEM_UML_light.png.in
156         cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_UML_light.png ./config.status 
157
158 MEDMEM_UML.png:MEDMEM_UML.png.in
159         cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_UML.png ./config.status 
160
161 # install procedure
162
163 install: $(datadir)/doc ps_2on1 pdf_2on1
164         $(RM) -r $(datadir)/doc/html_ref_user $(datadir)/doc/html_ref_devel $(datadir)/doc/*.ps $(datadir)/doc/*.pdf
165         cp -rf ./doc_ref_user/html $(datadir)/doc/html_ref_user
166         cp -rf ./doc_ref_devel/html $(datadir)/doc/html_ref_devel
167         cp -f MedMemory_user_2on1.ps MedMemory_user_2on1.pdf $(datadir)/doc
168         cp -f MEDMEM_UsersGuide_2on1.ps MEDMEM_UsersGuide_2on1.pdf $(datadir)/doc
169         cp -f MedMemory_devel_2on1.ps MedMemory_devel_2on1.pdf $(datadir)/doc
170
171 $(datadir)/doc:
172         $(INSTALL) -d $@ && chmod 755 $@
173
174 cleandoc:
175         -$(RM) -r *pdf *ps doc_ref_* $(top_builddir)/src/MEDMEM/doc_ref_* .dep*