Salome HOME
Update copyright information
[modules/kernel.git] / src / Communication_SWIG / Makefile.am
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 #
3 #  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 #
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.
10 #
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.
15 #
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
19 #
20 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #
22 #  File   : Makefile.am
23 #  Author : Guillaume Boulant (CSSI)
24 #  Module : KERNEL
25 #  $Header$
26 #
27 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
28
29 #
30 # ===============================================================
31 # Swig targets
32 # ===============================================================
33 # (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
34 #
35 # Step 1: build the wrapping source files with swig
36 #
37 # libSALOME_Comm.i -- swig --> swig_wrap.cpp
38 #                              libSALOME_Comm.py
39 #
40 # Step 2: build the dynamic library from cpp built source files and
41 #         dependant libraries.
42 #
43 # swig_wrap.cpp -- gcc --> swig_wrap.o    |-- link --> _libSALOME_Comm.la
44 #                          +              |
45 #                          dependant libs |
46 #
47 # The file libSALOME_Comm.py will be installed in
48 # <prefix>/lib/python<version>/site-package/salome.
49 # The library will be installed in the common place.
50 #
51
52 SWIG_FLAGS    = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Communication
53 SWIG_SOURCES  = libSALOME_Comm.i
54
55
56 nodist_salomepython_PYTHON = libSALOME_Comm.py
57 salomepyexec_LTLIBRARIES = _libSALOME_Comm.la
58 nodist__libSALOME_Comm_la_SOURCES = swig_wrap.cpp
59 _libSALOME_Comm_la_SOURCES  = $(SWIG_SOURCES)
60 _libSALOME_Comm_la_CPPFLAGS =\
61         @PYTHON_INCLUDES@ \
62         -I$(srcdir) -I$(srcdir)/../Communication \
63         -I$(srcdir)/../Basics \
64         -I$(srcdir)/../SALOMELocalTrace \
65         -I$(srcdir)/../Utils \
66         -I$(top_builddir)/salome_adm/unix \
67         -I$(top_builddir)/idl \
68         @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
69
70 _libSALOME_Comm_la_LDFLAGS  = -module
71 _libSALOME_Comm_la_LIBADD   = \
72         ../Communication/libSalomeCommunication.la \
73         @PYTHON_LIBS@
74
75 # _CS_gbo Actually, there's no need to get these flags optional. If
76 # the check mpi is not ok, the variables will be simply null.
77 if MPI_IS_OK
78 _libSALOME_Comm_la_CPPFLAGS+=@MPI_INCLUDES@
79 _libSALOME_Comm_la_LIBADD+=@MPI_LIBS@
80 endif
81
82
83 swig_wrap.cpp : $(SWIG_SOURCES)
84         $(SWIG) $(SWIG_FLAGS) -o $@ $<
85
86 CLEANFILES = swig_wrap.cpp libSALOME_Comm.py
87
88
89 #
90 # ===============================================================
91 # Files to be installed
92 # ===============================================================
93 #
94
95 # (see LifeCycleCORBA_SWIG for an example)
96
97 # It's not needed to specify libSALOME_Comm.py. It is
98 # automaticaly installed through the swig target salomepython_PYTHON.