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