Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / MEDSPLITTER / Makefile.am
1 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D
2 #
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 include $(top_srcdir)/adm_local/unix/make_common_starter.am
20
21 # this directory must be recompiled before Test folder
22
23 if CPPUNIT_IS_OK
24  SUBDIRS=. Test
25 endif
26
27 lib_LTLIBRARIES= libmedsplitter.la
28
29 salomeinclude_HEADERS= \
30 MEDSPLITTER_Topology.hxx \
31 MEDSPLITTER_MESHCollection.hxx \
32 MEDSPLITTER_MESHCollection.H \
33 MEDSPLITTER_MESHCollectionDriver.H \
34 MEDSPLITTER_MESHCollectionMedXMLDriver.H \
35 MEDSPLITTER_MESHCollectionMedAsciiDriver.H \
36 MEDSPLITTER_MESHCollectionDriver.hxx \
37 MEDSPLITTER_MESHCollectionMedXMLDriver.hxx \
38 MEDSPLITTER_MESHCollectionMedAsciiDriver.hxx \
39 MEDSPLITTER_ParallelTopology.hxx \
40 MEDSPLITTER_FaceModel.hxx \
41 MEDSPLITTER_Graph.hxx\
42 MEDSPLITTER_UserGraph.hxx\
43 MEDSPLITTER_API.hxx \
44 MEDSPLITTER_SequentialTopology.hxx \
45 MEDSPLITTER_utils.hxx \
46 MEDSPLITTER.hxx \
47 MEDSPLITTER_ParaDomainSelector.hxx \
48 MEDSPLITTER_MeshSendReceive.hxx \
49 MEDSPLITTER_JointExchangeData.hxx
50
51 if MED_ENABLE_METIS
52     salomeinclude_HEADERS+= MEDSPLITTER_METISGraph.hxx
53 endif
54 if MED_ENABLE_SCOTCH
55     salomeinclude_HEADERS+= MEDSPLITTER_SCOTCHGraph.hxx
56 endif
57
58 dist_libmedsplitter_la_SOURCES= \
59 MEDSPLITTER_MESHCollection.cxx \
60 MEDSPLITTER_MESHCollectionDriver.cxx \
61 MEDSPLITTER_MESHCollectionMedXMLDriver.cxx \
62 MEDSPLITTER_MESHCollectionMedAsciiDriver.cxx \
63 MEDSPLITTER_ParallelTopology.cxx \
64 MEDSPLITTER_Graph.cxx\
65 MEDSPLITTER_UserGraph.cxx\
66 MEDSPLITTER_API.cxx \
67 MEDSPLITTER_ParaDomainSelector.cxx \
68 MEDSPLITTER_MeshSendReceive.cxx \
69 MEDSPLITTER_JointExchangeData.cxx
70
71 if MPI_IS_OK
72 if MED_ENABLE_PARMETIS
73     dist_libmedsplitter_la_SOURCES+= MEDSPLITTER_METISGraph.cxx
74 endif
75 else !MPI_IS_OK
76 if MED_ENABLE_METIS
77     dist_libmedsplitter_la_SOURCES+= MEDSPLITTER_METISGraph.cxx
78 endif
79 endif
80 if MED_ENABLE_SCOTCH
81     dist_libmedsplitter_la_SOURCES+= MEDSPLITTER_SCOTCHGraph.cxx
82 endif
83
84 libmedsplitter_la_CPPFLAGS= $(MPI_INCLUDES) $(MED3_INCLUDES) $(HDF5_INCLUDES) \
85         $(BOOST_CPPFLAGS) $(LIBXML_INCLUDES) \
86         -I$(srcdir)/../MEDMEM \
87         -I$(srcdir)/../INTERP_KERNEL \
88         -I$(srcdir)/../INTERP_KERNEL/Bases \
89         -I$(srcdir)/../INTERP_KERNEL/GaussPoints
90
91 libmedsplitter_la_LDFLAGS= 
92 #libmedsplitter_la_LDFLAGS= $(MED3_LIBS_C_ONLY) $(HDF5_LIBS) $(STDLIB) $(LIBXML_LIBS) \
93 #       ../MEDMEM/libmedmem.la ../MEDWrapper/V2_1/Core/libmed_V2_1.la
94
95 if MPI_IS_OK
96 if MED_ENABLE_PARMETIS
97   libmedsplitter_la_CPPFLAGS+= $(PARMETIS_CPPFLAGS)
98   libmedsplitter_la_LDFLAGS+= $(PARMETIS_LIBS)
99 endif
100 else !MPI_IS_OK
101 if MED_ENABLE_METIS
102   libmedsplitter_la_CPPFLAGS+= $(METIS_CPPFLAGS)
103   libmedsplitter_la_LDFLAGS+= $(METIS_LIBS)
104 endif
105 endif
106 if MED_ENABLE_SCOTCH
107   libmedsplitter_la_CPPFLAGS+= $(SCOTCH_CPPFLAGS)
108   libmedsplitter_la_LDFLAGS+= $(SCOTCH_LIBS)
109 endif
110 if MED_ENABLE_KERNEL
111   libmedsplitter_la_CPPFLAGS+= $(BOOST_CPPFLAGS)
112   libmedsplitter_la_LDFLAGS+= ${KERNEL_LDFLAGS} -lSALOMELocalTrace $(BOOST_LIBS)
113 endif
114
115 libmedsplitter_la_CXXFLAGS = @CXXTMPDPTHFLAGS@
116
117 libmedsplitter_la_LDFLAGS+= $(MED3_LIBS_C_ONLY) $(HDF5_LIBS) $(STDLIB) $(LIBXML_LIBS) $(MPI_LIBS) \
118         ../MEDMEM/libmedmem.la ../INTERP_KERNEL/libinterpkernel.la
119
120 # Executables targets
121 bin_PROGRAMS= medsplitter
122
123 dist_medsplitter_SOURCES= medsplitter.cxx
124
125 medsplitter_CPPFLAGS= $(libmedsplitter_la_CPPFLAGS)
126
127 medsplitter_LDADD= $(libmedsplitter_la_LDFLAGS) -lm libmedsplitter.la
128 if MED_ENABLE_KERNEL
129   medsplitter_LDADD+= -lSALOMEBasics
130 endif
131
132 if MPI_IS_OK
133   bin_PROGRAMS+=medsplitter_para
134   dist_medsplitter_para_SOURCES= medsplitter_para.cxx
135   medsplitter_para_CPPFLAGS= $(medsplitter_CPPFLAGS)
136   medsplitter_para_LDADD= $(medsplitter_LDADD)
137   medsplitter_para_CXXFLAGS=@CXXTMPDPTHFLAGS@
138 endif
139
140 medsplitter_CXXFLAGS = @CXXTMPDPTHFLAGS@
141
142 OBSOLETE_FILES = \
143         MEDSPLITTER_SequentialTopology.cxx \
144         test_HighLevelAPI.cxx
145
146 EXTRA_DIST += $(OBSOLETE_FILES)