Salome HOME
Merge from V6_main (04/10/2012)
[tools/medcoupling.git] / src / MEDPartitioner / 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
20 include $(top_srcdir)/adm_local/unix/make_common_starter.am
21
22 # this directory must be recompiled before Test folder
23 if CPPUNIT_IS_OK
24  SUBDIRS=. Test
25 endif
26
27 lib_LTLIBRARIES= libmedpartitioner.la
28
29 salomeinclude_HEADERS= \
30 MEDPARTITIONER_MeshCollection.hxx \
31 MEDPARTITIONER_MeshCollectionDriver.hxx \
32 MEDPARTITIONER_MeshCollectionMedXmlDriver.hxx \
33 MEDPARTITIONER_MeshCollectionMedAsciiDriver.hxx \
34 MEDPARTITIONER_ParallelTopology.hxx \
35 MEDPARTITIONER_JointFinder.hxx \
36 MEDPARTITIONER_Graph.hxx \
37 MEDPARTITIONER_UserGraph.hxx\
38 MEDPARTITIONER_Utils.hxx \
39 MEDPARTITIONER.hxx \
40 MEDPARTITIONER_ParaDomainSelector.hxx \
41 MEDPARTITIONER_ConnectZone.hxx \
42 MEDPARTITIONER_SkyLineArray.hxx \
43 MEDPARTITIONER_Topology.hxx
44
45 #compilation of medpartitioner_para OR EXCLUSIVE medpartitioner
46 if MED_ENABLE_PARMETIS
47     salomeinclude_HEADERS+= MEDPARTITIONER_MetisGraph.hxx
48 else
49 if MED_ENABLE_METIS
50     salomeinclude_HEADERS += MEDPARTITIONER_MetisGraph.hxx
51 endif
52 if MED_ENABLE_SCOTCH
53     salomeinclude_HEADERS += MEDPARTITIONER_ScotchGraph.hxx
54 endif
55 endif
56
57 dist_libmedpartitioner_la_SOURCES= \
58 MEDPARTITIONER_MeshCollection.cxx \
59 MEDPARTITIONER_MeshCollectionDriver.cxx \
60 MEDPARTITIONER_MeshCollectionMedXmlDriver.cxx \
61 MEDPARTITIONER_MeshCollectionMedAsciiDriver.cxx \
62 MEDPARTITIONER_ParallelTopology.cxx \
63 MEDPARTITIONER_Graph.cxx\
64 MEDPARTITIONER_UserGraph.cxx\
65 MEDPARTITIONER_Utils.cxx \
66 MEDPARTITIONER_ParaDomainSelector.cxx \
67 MEDPARTITIONER_ConnectZone.cxx \
68 MEDPARTITIONER_SkyLineArray.cxx
69
70 if MPI_IS_OK
71     dist_libmedpartitioner_la_SOURCES+= \
72     MEDPARTITIONER_UtilsPara.cxx \
73     MEDPARTITIONER_JointFinder.cxx
74 endif
75
76 if MED_ENABLE_PARMETIS
77     dist_libmedpartitioner_la_SOURCES+= \
78     MEDPARTITIONER_ParMetisGraph.cxx
79 else
80 if MED_ENABLE_METIS
81     dist_libmedpartitioner_la_SOURCES += MEDPARTITIONER_MetisGraph.cxx
82 endif
83 if MED_ENABLE_SCOTCH
84     dist_libmedpartitioner_la_SOURCES += MEDPARTITIONER_ScotchGraph.cxx
85 endif
86 endif
87
88 libmedpartitioner_la_CPPFLAGS= $(MPI_INCLUDES) $(MED3_INCLUDES) $(HDF5_INCLUDES) \
89   $(LIBXML_INCLUDES) \
90   -I$(srcdir)/../INTERP_KERNEL \
91   -I$(srcdir)/../INTERP_KERNEL/Bases \
92   -I$(srcdir)/../MEDCoupling \
93   -I$(srcdir)/../MEDLoader \
94   -I$(srcdir)/../INTERP_KERNEL/GaussPoints
95
96 libmedpartitioner_la_LDFLAGS=  
97
98 if MED_ENABLE_PARMETIS
99   libmedpartitioner_la_CPPFLAGS+= $(PARMETIS_CPPFLAGS)
100   libmedpartitioner_la_LDFLAGS+= $(PARMETIS_LIBS)
101 else
102 if MED_ENABLE_METIS
103   libmedpartitioner_la_CPPFLAGS += $(METIS_CPPFLAGS)
104   libmedpartitioner_la_LDFLAGS += $(METIS_LIBS)
105 endif
106 if MED_ENABLE_SCOTCH
107   libmedpartitioner_la_CPPFLAGS += $(SCOTCH_CPPFLAGS)
108   libmedpartitioner_la_LDFLAGS += $(SCOTCH_LIBS)
109 endif
110 endif
111
112 libmedpartitioner_la_CXXFLAGS = @CXXTMPDPTHFLAGS@
113
114 libmedpartitioner_la_LDFLAGS+= $(MED3_LIBS_C_ONLY) $(HDF5_LIBS) $(STDLIB) $(LIBXML_LIBS) $(MPI_LIBS) ../INTERP_KERNEL/libinterpkernel.la ../MEDCoupling/libmedcoupling.la ../MEDLoader/libmedloader.la
115
116 # Executables targets
117 if MED_ENABLE_PARMETIS
118   bin_PROGRAMS=medpartitioner_para
119   dist_medpartitioner_para_SOURCES= medpartitioner_para.cxx
120   medpartitioner_para_CPPFLAGS= $(libmedpartitioner_la_CPPFLAGS)
121   medpartitioner_para_LDADD= $(libmedpartitioner_la_LDFLAGS) -lm libmedpartitioner.la
122   medpartitioner_para_CXXFLAGS=@CXXTMPDPTHFLAGS@
123 else
124   bin_PROGRAMS= medpartitioner
125   dist_medpartitioner_SOURCES= medpartitioner.cxx
126   medpartitioner_CPPFLAGS= $(libmedpartitioner_la_CPPFLAGS)
127   medpartitioner_LDADD= $(libmedpartitioner_la_LDFLAGS) -lm libmedpartitioner.la
128   medpartitioner_CXXFLAGS = @CXXTMPDPTHFLAGS@
129 endif
130
131
132 OBSOLETE_FILES = 
133
134 EXTRA_DIST += $(OBSOLETE_FILES)
135