Salome HOME
9416cec2f64e6509f7e21b3f1a9c859939e78175
[modules/med.git] / src / MEDCalculator / Swig / 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 #  MED MEDMEM_SWIG : binding of C++ implementation and Python
21 #
22 include $(top_srcdir)/adm_local/unix/make_common_starter.am
23
24 EXTRA_DIST += CMakeLists.txt
25
26 bin_PROGRAMS = spython
27
28 lib_LTLIBRARIES = libmedcalculatorspython.la _MEDCalculator.la 
29
30 salomeinclude_HEADERS =  \
31         MEDCalculator.i MEDCalculatorTypemaps.i SPythonInterpreter.hxx SPythonParser.hxx MedCalculatorSPythonDefines.hxx
32
33 SWIG_DEF = MEDCalculator.i MEDCalculatorTypemaps.i
34
35 SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../../MEDCoupling \
36         -I$(srcdir)/../../MEDCoupling_Swig -I$(srcdir)/../../MEDLoader -I$(srcdir)/../../MEDLoader/Swig \
37         -I$(srcdir)/../../INTERP_KERNEL -I$(srcdir)/../../INTERP_KERNEL/Bases
38
39 dist__MEDCalculator_la_SOURCES   = $(SWIG_DEF)
40 nodist__MEDCalculator_la_SOURCES = MEDCalculator_wrap.cxx
41 MEDCalculator.py: MEDCalculator_wrap.cxx
42
43 MEDCalculator_wrap.cxx: $(SWIG_DEF)
44         $(SWIG) $(SWIG_FLAGS) -o $@  $<
45
46 _MEDCalculator_la_CPPFLAGS = $(PYTHON_INCLUDES) \
47         $(MED3_INCLUDES) $(HDF5_INCLUDES) @CXXTMPDPTHFLAGS@ \
48         -I$(srcdir)/../../INTERP_KERNEL \
49         -I$(srcdir)/.. -I$(srcdir)/../../MEDCoupling_Swig -I$(srcdir)/../../INTERP_KERNEL/Bases \
50         -I$(srcdir)/../../MEDCoupling -I$(srcdir)/../../MEDLoader -I$(srcdir)/../../MEDLoader/Swig
51
52 _MEDCalculator_la_LDFLAGS  = -module $(MED3_LIBS_C_ONLY) $(HDF5_LIBS) $(PYTHON_LIBS) \
53         ../libmedcalculator.la
54
55 dist_libmedcalculatorspython_la_SOURCES = SPythonInterpreter.cxx SPythonParser.cxx
56
57 libmedcalculatorspython_la_CPPFLAGS = $(PYTHON_INCLUDES) -I$(srcdir)/../../INTERP_KERNEL/Bases \
58                                       -I$(srcdir)/../../INTERP_KERNEL    
59
60 libmedcalculatorspython_la_LDFLAGS = $(PYTHON_LIBS) ../../INTERP_KERNEL/libinterpkernel.la
61
62 spython_CPPFLAGS = $(PYTHON_INCLUDES)
63
64 spython_LDFLAGS = $(PYTHON_LIBS)
65 spython_LDADD   = libmedcalculatorspython.la
66
67 dist_spython_SOURCES = spython.cxx
68
69 CLEANFILES = MEDCalculator_wrap.cxx MEDCalculator.py
70
71 dist_salomescript_DATA= MEDCalculator.py MEDCalculatorBasicsTest.py test2.spy
72
73 UNIT_TEST_PROG = MEDCalculatorBasicsTest.py