Salome HOME
b06d7820e56c7bd6149b2618794fde9636dc61af
[tools/medcoupling.git] / doc / MEDMEM / Makefile.in
1 # -* Makefile *- 
2 #
3 # Author : Nadir BOUHAMOU (CEA)
4 #
5
6 # source path
7 top_srcdir=@top_srcdir@
8 top_builddir=../..
9 srcdir=@srcdir@
10 VPATH=.:@srcdir@
11 doxygen=@DOXYGEN@
12
13 @COMMENCE@
14
15 # Executables targets
16 BIN = MESHgeneral MESHcoordinates MESHconnectivities MESHINGexample FIELDcreate FIELDgeneral MEDMEM_InvokingDriverByAttachingItToAnObject MEDMEM_InvokingDriverFromStandardObjectMethod MEDMEM_InvokingDriverAtObjectCreationTime 
17
18 LDFLAGS+= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome 
19 LDFLAGSFORBIN+= -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome
20
21 CPPFLAGS+=$(MED2_INCLUDES) $(HDF5_INCLUDES)
22
23 CXXFLAGS+=@CXXTMPDPTHFLAGS@
24 #LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS)
25 # change motivated by the bug KERNEL4778.
26 LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lmedmem -lmed_V2_1 $(STDLIB)
27
28 #LDFLAGSFORBIN+=$(MED2_LIBS) $(HDF5_LIBS)
29 # change motivated by the bug KERNEL4778.
30 LDFLAGSFORBIN+=-lm $(MED2_LIBS) $(HDF5_LIBS) -lmedmem -lmed_V2_1
31
32 ifeq ($(MED_WITH_KERNEL),yes)
33   CPPFLAGS+= ${KERNEL_CXXFLAGS}
34   CXXFLAGS+= ${KERNEL_CXXFLAGS}
35   LDFLAGS+= ${KERNEL_LDFLAGS} -lSALOMELocalTrace 
36   LDFLAGSFORBIN+= ${KERNEL_LDFLAGS} -lSALOMELocalTrace -lSALOMEBasics
37 endif
38
39 LIBSFORBIN=
40
41 LIBS=
42
43 @CONCLUDE@
44
45 doc: .doxygen_user .doxygen_devel ps
46
47 ps: .doxygen_user .doxygen_devel MedMemory_user.ps MedMemory_devel.ps MEDMEM_UsersGuide.ps
48
49 ps_2on1: .doxygen_user .doxygen_devel MedMemory_user_2on1.ps MedMemory_devel_2on1.ps MEDMEM_UsersGuide_2on1.ps
50
51 pdf: .doxygen_user .doxygen_devel MedMemory_user.pdf MedMemory_devel.pdf MEDMEM_UsersGuide.pdf
52
53 pdf_2on1: .doxygen_user .doxygen_devel MedMemory_user_2on1.pdf MedMemory_devel_2on1.pdf MEDMEM_UsersGuide_2on1.pdf
54
55 # user doc :
56
57 .doxygen_user: $(top_srcdir)/src/MEDMEM/Doxyfile_med_user.in
58         cd $(top_builddir) ; ./config.status
59         cd $(top_builddir)/src/MEDMEM && $(doxygen) Doxyfile_med_user
60         touch $@
61         $(RM) -r doc_ref_user
62         ln -s $(top_builddir)/src/MEDMEM/doc_ref_user doc_ref_user
63
64 MedMemory_user.ps:
65         cd ./doc_ref_user/latex && $(MAKE) ps
66         cp -f ./doc_ref_user/latex/refman.ps $@
67
68 MedMemory_user_2on1.ps:
69         cd ./doc_ref_user/latex && $(MAKE) ps_2on1
70         cp -f ./doc_ref_user/latex/refman_2on1.ps $@
71
72 MedMemory_user.pdf:
73         cd ./doc_ref_user/latex && $(MAKE) pdf
74         cp -f ./doc_ref_user/latex/refman.pdf $@
75
76 MedMemory_user_2on1.pdf:
77         cd ./doc_ref_user/latex && $(MAKE) pdf_2on1
78         cp -f ./doc_ref_user/latex/refman_2on1.pdf $@
79
80 # developper doc
81
82 .doxygen_devel: $(top_srcdir)/src/MEDMEM/Doxyfile_med_devel.in
83         cd $(top_builddir) ; ./config.status
84         cd $(top_builddir)/src/MEDMEM && $(doxygen) Doxyfile_med_devel
85         touch $@
86         $(RM) -r doc_ref_devel
87         ln -s $(top_builddir)/src/MEDMEM/doc_ref_devel doc_ref_devel
88
89 MedMemory_devel.ps:
90         cd ./doc_ref_devel/latex && $(MAKE) ps
91         cp -f ./doc_ref_devel/latex/refman.ps $@
92
93 MedMemory_devel_2on1.ps:
94         cd ./doc_ref_devel/latex && $(MAKE) ps_2on1
95         cp -f ./doc_ref_devel/latex/refman_2on1.ps $@
96
97 MedMemory_devel.pdf:
98         cd ./doc_ref_devel/latex && $(MAKE) pdf
99         cp -f ./doc_ref_devel/latex/refman.pdf $@
100
101 MedMemory_devel_2on1.pdf:
102         cd ./doc_ref_devel/latex && $(MAKE) pdf_2on1
103         cp -f ./doc_ref_devel/latex/refman_2on1.pdf $@
104
105 # User Guide
106
107 MEDMEM_UsersGuide.ps: MEDMEM_UsersGuide.dvi
108         dvips -o MEDMEM_UsersGuide.ps MEDMEM_UsersGuide.dvi
109
110 MEDMEM_UsersGuide.pdf: MEDMEM_UsersGuide.ps
111         ps2pdf MEDMEM_UsersGuide.ps MEDMEM_UsersGuide.pdf
112
113 MEDMEM_UsersGuide_2on1.ps: MEDMEM_UsersGuide.ps
114         psnup -2 MEDMEM_UsersGuide.ps >MEDMEM_UsersGuide_2on1.ps
115
116 MEDMEM_UsersGuide_2on1.pdf: MEDMEM_UsersGuide_2on1.ps
117         ps2pdf MEDMEM_UsersGuide_2on1.ps MEDMEM_UsersGuide_2on1.pdf
118
119
120 MEDMEM_UML.eps:MEDMEM_UML.dia
121         dia -e $@ $<
122
123 MEDMEM_UsersGuide.dvi: MEDMEM_UsersGuide.tex MEDMEM_UML.eps
124         echo "Running latex..."
125         latex $<
126         #echo "Running makeindex..."
127         #makeindex MEDMEM_UsersGuide.idx
128         echo "Rerunning latex...."
129         latex $<
130         latex_count=5
131         while egrep -s 'Rerun (LaTeX|to get cross-references right)' MEDMEM_UsersGuide.log && [ $latex_count -gt 0 ] ;\
132             do \
133               echo "Rerunning latex...." ;\
134               latex $< ;\
135               latex_count=`expr $latex_count - 1` ;\
136             done
137
138 MEDMEM_UsersGuide.tex:MEDMEM_UsersGuide.tex.in
139         cd $(top_builddir) && CONFIG_FILES=./doc/MEDMEM/MEDMEM_UsersGuide.tex ./config.status
140
141 # install procedure
142
143 install: $(datadir)/doc ps_2on1 pdf_2on1
144         $(RM) -r $(datadir)/doc/html_ref_user $(datadir)/doc/html_ref_devel $(datadir)/doc/*.ps $(datadir)/doc/*.pdf
145         cp -rf ./doc_ref_user/html $(datadir)/doc/html_ref_user
146         cp -rf ./doc_ref_devel/html $(datadir)/doc/html_ref_devel
147         cp -f MedMemory_user_2on1.ps MedMemory_user_2on1.pdf $(datadir)/doc
148         cp -f MEDMEM_UsersGuide_2on1.ps MEDMEM_UsersGuide_2on1.pdf $(datadir)/doc
149         cp -f MedMemory_devel_2on1.ps MedMemory_devel_2on1.pdf $(datadir)/doc
150
151 $(datadir)/doc:
152         $(INSTALL) -d $@ && chmod 755 $@
153
154 cleandoc:
155         -$(RM) -r *pdf *ps doc_ref_* $(top_builddir)/src/MEDMEM/doc_ref_* .dep*