1 # Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 # Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License.
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 # Author : Guillaume Boulant (CSSI)
28 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
31 # ===============================================================
33 # ===============================================================
34 # (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
36 # Step 1: build the wrapping source files with swig
38 # libSALOME_Comm.i -- swig --> swig_wrap.cpp
41 # Step 2: build the dynamic library from cpp built source files and
42 # dependant libraries.
44 # swig_wrap.cpp -- gcc --> swig_wrap.o |-- link --> _libSALOME_Comm.la
48 # The file libSALOME_Comm.py will be installed in
49 # <prefix>/lib/python<version>/site-package/salome.
50 # The library will be installed in the common place.
53 BUILT_SOURCES = swig_wrap.cpp libSALOME_Comm.py
55 SWIG_FLAGS = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Communication
56 SWIGSOURCES = libSALOME_Comm.i
59 salomepython_PYTHON = libSALOME_Comm.py
60 salomepyexec_LTLIBRARIES = _libSALOME_Comm.la
61 _libSALOME_Comm_la_SOURCES = swig_wrap.cpp
62 _libSALOME_Comm_la_CPPFLAGS =\
64 -I$(srcdir) -I$(srcdir)/../Communication \
65 -I$(srcdir)/../Basics \
66 -I$(srcdir)/../SALOMELocalTrace \
67 -I$(srcdir)/../Utils \
68 -I$(top_builddir)/idl \
69 @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
71 _libSALOME_Comm_la_LDFLAGS = -module
72 _libSALOME_Comm_la_LIBADD = \
73 ../Communication/libSalomeCommunication.la \
76 # _CS_gbo Actually, there's no need to get these flags optional. If
77 # the check mpi is not ok, the variables will be simply null.
79 _libSALOME_Comm_la_CPPFLAGS+=@MPI_INCLUDES@
80 _libSALOME_Comm_la_LIBADD+=@MPI_LIBS@
84 swig_wrap.cpp libSALOME_Comm.py : $(SWIGSOURCES)
85 $(SWIG) $(SWIG_FLAGS) -o swig_wrap.cpp $<
87 CLEANFILES = swig_wrap.cpp
89 EXTRA_DIST = $(SWIGSOURCES)
92 # ===============================================================
93 # Files to be installed
94 # ===============================================================
97 # (see LifeCycleCORBA_SWIG for an example)
99 # It's not needed to specify libSALOME_Comm.py. It is
100 # automaticaly installed through the swig target salomepython_PYTHON.