Salome HOME
3efca0b19547e37c615227365f74a432dea6a956
[modules/med.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 MEDPARTITIONER_metis.h
45
46 #compilation of medpartitioner_para OR EXCLUSIVE medpartitioner
47 if MED_ENABLE_PARMETIS
48     salomeinclude_HEADERS+= MEDPARTITIONER_ParMetisGraph.hxx
49 endif
50 if MED_ENABLE_METIS
51     salomeinclude_HEADERS += MEDPARTITIONER_MetisGraph.hxx
52 endif
53 if MED_ENABLE_SCOTCH
54     salomeinclude_HEADERS += MEDPARTITIONER_ScotchGraph.hxx
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 MEDPARTITIONER_metis.c
70
71 if MPI_IS_OK
72     dist_libmedpartitioner_la_SOURCES+= \
73     MEDPARTITIONER_UtilsPara.cxx \
74     MEDPARTITIONER_JointFinder.cxx
75 endif
76
77 if MED_ENABLE_PARMETIS
78     dist_libmedpartitioner_la_SOURCES+= \
79     MEDPARTITIONER_ParMetisGraph.cxx
80 endif
81 if MED_ENABLE_METIS
82     dist_libmedpartitioner_la_SOURCES += MEDPARTITIONER_MetisGraph.cxx
83 endif
84 if MED_ENABLE_SCOTCH
85     dist_libmedpartitioner_la_SOURCES += MEDPARTITIONER_ScotchGraph.cxx
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 endif
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
111 libmedpartitioner_la_CXXFLAGS = @CXXTMPDPTHFLAGS@
112
113 libmedpartitioner_la_LDFLAGS+= $(MED3_LIBS_C_ONLY) $(HDF5_LIBS) $(STDLIB) $(LIBXML_LIBS) $(MPI_LIBS) ../INTERP_KERNEL/libinterpkernel.la ../MEDCoupling/libmedcoupling.la ../MEDLoader/libmedloader.la
114
115 # Executables targets
116
117 bin_PROGRAMS= medpartitioner
118 dist_medpartitioner_SOURCES= medpartitioner.cxx
119 medpartitioner_CPPFLAGS= $(libmedpartitioner_la_CPPFLAGS)
120 medpartitioner_LDADD= $(libmedpartitioner_la_LDFLAGS) -lm libmedpartitioner.la
121 medpartitioner_CXXFLAGS = @CXXTMPDPTHFLAGS@
122
123 if MED_ENABLE_PARMETIS
124   bin_PROGRAMS=medpartitioner_para
125   dist_medpartitioner_para_SOURCES= medpartitioner_para.cxx
126   medpartitioner_para_CPPFLAGS= $(libmedpartitioner_la_CPPFLAGS)
127   medpartitioner_para_LDADD= $(libmedpartitioner_la_LDFLAGS) -lm libmedpartitioner.la
128   medpartitioner_para_CXXFLAGS=@CXXTMPDPTHFLAGS@
129 endif
130
131
132 OBSOLETE_FILES = 
133
134 EXTRA_DIST += $(OBSOLETE_FILES)
135