Salome HOME
GEOM porting to CMake
[modules/geom.git] / src / GEOM_SWIG_WITHIHM / Makefile.am
1 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
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
20 include $(top_srcdir)/adm_local/unix/make_common_starter.am
21
22 # ===============================================================
23 # Swig targets
24 # ===============================================================
25 # (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
26 #
27 # Step 1: build the wrapping source files with swig
28 #
29 # libSALOME_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
30 #                                        libSALOME_Swig.py
31 #
32 # Step 2: build the dynamic library from cpp built source files and
33 #         dependant libraries.
34 #
35 # swig_wrap.cpp -- gcc --> swig_wrap.o    |-- link --> _libGEOM_Swig.la
36 #                          +              |
37 #                          dependant libs |
38 #
39 # The files libGEOM_Swig.py and _libGEOM_Swig.so will be installed to the
40 # <prefix>/lib/python<version>/site-package/salome directory.
41 #
42
43 SWIG_FLAGS    = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../GEOMGUI
44 SWIG_SOURCES  = libGEOM_Swig.i
45
46 salomeinclude_HEADERS = $(SWIG_SOURCES) libGEOM_Swig.h
47
48 salomepython_PYTHON = libGEOM_Swig.py
49 salomepyexec_LTLIBRARIES = _libGEOM_Swig.la
50
51 _libGEOM_Swig_la_SOURCES        = $(SWIG_SOURCES) libGEOM_Swig.h libGEOM_Swig.cxx
52 nodist__libGEOM_Swig_la_SOURCES = swig_wrap.cpp
53
54 _libGEOM_Swig_la_CPPFLAGS =             \
55         $(QT_INCLUDES)                  \
56         $(PYTHON_INCLUDES)              \
57         $(CAS_CPPFLAGS)                 \
58         $(VTK_INCLUDES)                 \
59         $(OGL_INCLUDES)                 \
60         $(KERNEL_CXXFLAGS)              \
61         $(GUI_CXXFLAGS)                 \
62         $(CORBA_CXXFLAGS)               \
63         $(CORBA_INCLUDES)               \
64         $(BOOST_CPPFLAGS)               \
65         -I$(srcdir)/../GEOMClient       \
66         -I$(srcdir)/../OBJECT           \
67         -I$(srcdir)/../GEOMGUI          \
68         -I$(srcdir)/../GEOMToolsGUI     \
69         -I$(srcdir)/../Material         \
70         -I$(top_builddir)/idl
71
72 _libGEOM_Swig_la_LDFLAGS = -module
73 _libGEOM_Swig_la_LIBADD  =              \
74         ../GEOMGUI/libGEOM.la           \
75         ../GEOMToolsGUI/libGEOMToolsGUI.la      \
76         ../Material/libMaterial.la      \
77         $(PYTHON_LIBS)
78
79 swig_wrap.cpp : $(SWIG_SOURCES)
80         $(SWIG) $(SWIG_FLAGS) -o $@ $<
81
82 libGEOM_Swig.py: swig_wrap.cpp
83
84 CLEANFILES = swig_wrap.cpp libGEOM_Swig.py
85