Salome HOME
Merge from V6_main 01/04/2013
[modules/gui.git] / src / SALOME_SWIG / Makefile.am
1 # Copyright (C) 2007-2013  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.in
24 #  Author : Paul RASCLE, EDF
25 #  Module : SALOME
26 #
27 include $(top_srcdir)/adm_local/unix/make_common_starter.am
28
29 # ===============================================================
30 # Swig targets
31 # ===============================================================
32 # (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
33 #
34 # Step 1: build the wrapping source files with swig
35 #
36 # libSALOME_Swig.i -- swig --> swig_wrap.cpp libSALOME_Swig.py
37 #
38 # Step 2: build the dynamic library from cpp built source files and
39 #         dependant libraries.
40 #
41 # swig_wrap.cpp -- gcc --> swig_wrap.o    |-- link --> _libSALOME_Swig.la
42 #                          +              |
43 #                          dependant libs |
44 #
45 # The file libSALOME_Swig.py will be installed in the
46 # <prefix>/lib/python<version>/site-package/salome folder.
47 # The library _libSALOME_Swig.so will be installed in 
48 # the <prefix>/lib/salome folder.
49 #
50
51 SWIG_FLAGS    = @SWIG_FLAGS@ -I$(srcdir)
52 SWIG_SOURCES  = libSALOME_Swig.i
53
54 libSALOME_Swig.py: swig_wrap.cpp
55
56 salomepython_PYTHON = libSALOME_Swig.py
57 salomepyexec_LTLIBRARIES = _libSALOME_Swig.la
58
59 _libSALOME_Swig_la_SOURCES = $(SWIG_SOURCES) SALOMEGUI_Swig.cxx
60 nodist__libSALOME_Swig_la_SOURCES = swig_wrap.cpp
61 salomeinclude_HEADERS = $(SWIG_SOURCES) SALOMEGUI_Swig.hxx SALOMEGUI_Swig.i
62
63 _libSALOME_Swig_la_CPPFLAGS = \
64         $(QT_INCLUDES) $(QWT_INCLUDES) $(PYTHON_INCLUDES) $(CAS_CPPFLAGS) $(VTK_INCLUDES)       \
65         $(OGL_INCLUDES) $(BOOST_CPPFLAGS) -DHAVE_CONFIG_H @KERNEL_CXXFLAGS@                     \
66         -I$(top_builddir)/idl -I$(srcdir)                                                       \
67         -I$(srcdir)/../LightApp -I$(srcdir)/../Qtx -I$(srcdir)/../SUIT                          \
68         -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LightApp -I$(srcdir)/../SOCC                   \
69         -I$(srcdir)/../SVTK -I$(srcdir)/../Event -I$(srcdir)/../OBJECT                          \
70         -I$(srcdir)/../CAM -I$(srcdir)/../STD -I$(srcdir)/../OCCViewer                          \
71         -I$(srcdir)/../Prs -I$(srcdir)/../VTKViewer -I$(srcdir)/../SPlot2d                      \
72         -I$(srcdir)/../Plot2d
73
74 _libSALOME_Swig_la_LDFLAGS  = -module
75 _libSALOME_Swig_la_LIBADD   =           \
76         ../LightApp/libLightApp.la      \
77         @PYTHON_LIBS@
78
79 swig_wrap.cpp : $(SWIG_SOURCES)
80         $(SWIG) $(SWIG_FLAGS) -o $@ $<
81
82 CLEANFILES = swig_wrap.cpp libSALOME_Swig.py
83
84 #
85 # ===============================================================
86 # Files to be installed
87 # ===============================================================
88 #
89
90 # Scripts to be installed.
91 dist_salomescript_DATA =        \
92         examplevtk1.py          \
93         test_table.py           \
94         test_big_table.py       \
95         test_many_objects.py    \
96         test_remove_ref.py
97
98 nodist_salomescript_DATA =              \
99         libSALOME_Swig.py               \
100         supervisionexample.py           \
101         supervisiongeomexample.py
102
103 sharedpkgpython_PYTHON = SALOMEGUI_shared_modules.py