Salome HOME
IMP NPAL13547: Checkbox to kill SALOME completely.
[modules/kernel.git] / src / Communication_SWIG / Makefile.am
1 #  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 #  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
3
4 #  This library is free software; you can redistribute it and/or 
5 #  modify it under the terms of the GNU Lesser General Public 
6 #  License as published by the Free Software Foundation; either 
7 #  version 2.1 of the License. 
8
9 #  This library is distributed in the hope that it will be useful, 
10 #  but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 #  Lesser General Public License for more details. 
13
14 #  You should have received a copy of the GNU Lesser General Public 
15 #  License along with this library; if not, write to the Free Software 
16 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
17
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #
20 #
21 #
22 #  File   : Makefile.am
23 #  Author : Guillaume Boulant (CSSI)
24 #  Module : KERNEL
25 #  $Header$
26
27
28 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
29
30 #
31 # ===============================================================
32 # Swig targets
33 # ===============================================================
34 # (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
35 #
36 # Step 1: build the wrapping source files with swig
37 #
38 # libSALOME_Comm.i -- swig --> swig_wrap.cpp
39 #                              libSALOME_Comm.py
40 #
41 # Step 2: build the dynamic library from cpp built source files and
42 #         dependant libraries.
43 #
44 # swig_wrap.cpp -- gcc --> swig_wrap.o    |-- link --> _libSALOME_Comm.la
45 #                          +              |
46 #                          dependant libs |
47 #
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.
51 #
52
53 BUILT_SOURCES = swig_wrap.cpp
54
55 SWIG_FLAGS    = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Communication
56 SWIG_SOURCES  = libSALOME_Comm.i
57
58
59 pkgpython_PYTHON = libSALOME_Comm.py
60 pkgpyexec_LTLIBRARIES = _libSALOME_Comm.la
61 _libSALOME_Comm_la_SOURCES  = $(BUILT_SOURCES) $(SWIG_SOURCES)
62 _libSALOME_Comm_la_CPPFLAGS =\
63         @PYTHON_INCLUDES@ \
64         -I$(srcdir) -I$(srcdir)/../Communication \
65         -I$(srcdir)/../Basics \
66         -I$(srcdir)/../SALOMELocalTrace \
67         -I$(srcdir)/../Utils \
68         -I$(top_builddir)/salome_adm/unix \
69         -I$(top_builddir)/idl \
70         @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
71
72 _libSALOME_Comm_la_LDFLAGS  = -module
73 _libSALOME_Comm_la_LIBADD   = \
74         ../Communication/libSalomeCommunication.la \
75         @PYTHON_LIBS@
76
77 # _CS_gbo Actually, there's no need to get these flags optional. If
78 # the check mpi is not ok, the variables will be simply null.
79 if MPI_IS_OK
80 _libSALOME_Comm_la_CPPFLAGS+=@MPI_INCLUDES@
81 _libSALOME_Comm_la_LIBADD+=@MPI_LIBS@
82 endif
83
84
85 swig_wrap.cpp : $(SWIG_SOURCES)
86         $(SWIG) $(SWIG_FLAGS) -o $@ $<
87
88 CLEANFILES = swig_wrap.cpp
89
90
91 #
92 # ===============================================================
93 # Files to be installed
94 # ===============================================================
95 #
96
97 # (see LifeCycleCORBA_SWIG for an example)
98
99 # It's not needed to specify libSALOME_Comm.py. It is
100 # automaticaly installed through the swig target pkgpython_PYTHON.