Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / MEDPartitioner / Test / 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 #  SALOMELocalTrace : log on local machine
21 #
22 include $(top_srcdir)/adm_local/unix/make_common_starter.am
23
24 lib_LTLIBRARIES = libMEDPARTITIONERTest.la
25
26 dist_libMEDPARTITIONERTest_la_SOURCES = MEDPARTITIONERTest.cxx
27
28 if MPI_IS_OK
29   dist_libMEDPARTITIONERTest_la_SOURCES += MEDPARTITIONERTestPara.cxx
30 endif
31
32 salomeinclude_HEADERS = MEDPARTITIONERTest.hxx
33
34 libMEDPARTITIONERTest_la_CPPFLAGS = \
35         @CPPUNIT_INCLUDES@ \
36         $(MPI_INCLUDES) \
37         $(MED3_INCLUDES) \
38         $(HDF5_INCLUDES) \
39         $(LIBXML_INCLUDES) \
40         -I$(srcdir)/.. \
41         -I$(srcdir)/../../MEDCoupling \
42         -I$(srcdir)/../../MEDLoader \
43         -I$(srcdir)/../../INTERP_KERNEL/Bases \
44         -I$(srcdir)/../../INTERP_KERNEL/GaussPoints \
45         -I$(srcdir)/../../INTERP_KERNEL
46
47 libMEDPARTITIONERTest_la_LDFLAGS=  
48
49 if MED_ENABLE_PARMETIS
50   libMEDPARTITIONERTest_la_CPPFLAGS+= $(PARMETIS_CPPFLAGS)
51   libMEDPARTITIONERTest_la_LDFLAGS+= $(PARMETIS_LIBS)
52 else
53 if MED_ENABLE_METIS
54   libMEDPARTITIONERTest_la_CPPFLAGS += $(METIS_CPPFLAGS)
55   libMEDPARTITIONERTest_la_LDFLAGS += $(METIS_LIBS)
56 endif
57 if MED_ENABLE_SCOTCH
58   libMEDPARTITIONERTest_la_CPPFLAGS += $(SCOTCH_CPPFLAGS)
59   libMEDPARTITIONERTest_la_LDFLAGS += $(SCOTCH_LIBS)
60 endif
61 endif
62
63 libMEDPARTITIONERTest_la_LDFLAGS += \
64         $(MED3_LIBS_C_ONLY) \
65         $(HDF5_LIBS) \
66         $(MPI_LIBS) \
67         @CPPUNIT_LIBS@ \
68         ../../MEDLoader/libmedloader.la \
69         ../libmedpartitioner.la 
70
71 # Executables targets
72
73 dist_salomescript_DATA = 
74 UNIT_TEST_PROG =
75
76 bin_PROGRAMS = TestMEDPARTITIONER
77 TestMEDPARTITIONER_SOURCES = TestMEDPARTITIONER.cxx
78 TestMEDPARTITIONER_CPPFLAGS = $(libMEDPARTITIONERTest_la_CPPFLAGS) \
79         -I$(srcdir)/../../INTERP_KERNELTest
80
81 if MPI_IS_OK
82   TestMEDPARTITIONER_CPPFLAGS +=$(MPI_INCLUDES) $(PARMETIS_CPPFLAGS)
83 else
84 if MED_ENABLE_METIS
85   TestMEDPARTITIONER_CPPFLAGS += $(METIS_CPPFLAGS)
86 endif
87 if MED_ENABLE_SCOTCH
88   TestMEDPARTITIONER_CPPFLAGS += $(SCOTCH_CPPFLAGS)
89 endif
90 endif
91
92 TestMEDPARTITIONER_LDADD = \
93         $(libMEDPARTITIONERTest_la_LDFLAGS) -lm \
94         libMEDPARTITIONERTest.la \
95         ../../INTERP_KERNEL/libinterpkernel.la \
96         ../libmedpartitioner.la
97
98 UNIT_TEST_PROG += TestMEDPARTITIONER
99
100 check: tests
101
102 CLEANFILES = UnitTestsResult
103
104 clean-local:
105         rm -rf *.med *.xml