Salome HOME
1) Add CMake files to the dist rules (make dist)
[modules/kernel.git] / src / LifeCycleCORBA_SWIG / Makefile.am
1 # Copyright (C) 2007-2012  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
23 #  File   : Makefile.am
24 #  Author : Guillaume Boulant (CSSI)
25 #  Module : KERNEL
26 #  $Header$
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_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
39 #                                        libSALOME_LifeCycleCORBA.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_LifeCycleCORBA.la
45 #                          +              |
46 #                          dependant libs |
47 #
48 # The file libSALOME_LifeCycleCORBA.py will be installed in
49 # <prefix>/lib/python<version>/site-package/salome.
50 # The library will be installed in the same place.
51 #
52
53 BUILT_SOURCES = swig_wrap.cpp libSALOME_LifeCycleCORBA.py
54
55 SWIG_FLAGS    = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../LifeCycleCORBA -I$(srcdir)/../Utils
56 SWIGSOURCES  = libSALOME_LifeCycleCORBA.i
57
58 salomepython_PYTHON = libSALOME_LifeCycleCORBA.py
59 salomepyexec_LTLIBRARIES = _libSALOME_LifeCycleCORBA.la
60 _libSALOME_LifeCycleCORBA_la_SOURCES  = swig_wrap.cpp
61 _libSALOME_LifeCycleCORBA_la_CPPFLAGS =\
62         @PYTHON_INCLUDES@ \
63         -I$(srcdir) \
64         -I$(srcdir)/../NamingService \
65         -I$(srcdir)/../LifeCycleCORBA \
66         -I$(srcdir)/../Basics \
67         -I$(srcdir)/../SALOMELocalTrace \
68         -I$(srcdir)/../Utils \
69         -I$(top_builddir)/idl \
70         @CORBA_CXXFLAGS@ @CORBA_INCLUDES@
71
72 _libSALOME_LifeCycleCORBA_la_LDFLAGS  = -module
73 _libSALOME_LifeCycleCORBA_la_LIBADD   = \
74         ../LifeCycleCORBA/libSalomeLifeCycleCORBA.la \
75         @PYTHON_LIBS@
76
77 swig_wrap.cpp libSALOME_LifeCycleCORBA.py : $(SWIGSOURCES)
78         $(SWIG) $(SWIG_FLAGS) -o swig_wrap.cpp $<
79
80 CLEANFILES = swig_wrap.cpp
81
82 EXTRA_DIST += $(SWIGSOURCES)
83
84 #
85 # ===============================================================
86 # Files to be installed
87 # ===============================================================
88 #
89
90 # Scripts to be installed.
91 dist_salomescript_PYTHON =\
92         LifeCycleCORBA.py \
93         TestLifeCycleCORBA.py
94
95 # It's not needed to specify libSALOME_LifeCycleCORBA.py. It is
96 # automaticaly installed through the swig target salomepython_PYTHON.