Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/smesh.git] / src / SMESH_SWIG_WITHIHM / 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.in
23 #  Author : Nicolas REJNERI, Paul RASCLE
24 #  Modified by : Alexander BORODIN (OCN) - autotools usage
25 #  Module : SMESH
26 #  $Header$
27
28 include $(top_srcdir)/adm_local/unix/make_common_starter.am
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_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
38 #                                        libSALOME_Swig.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_Swig.la
44 #                          +              |
45 #                          dependant libs |
46 #
47 # The file libSALOME_Swigcmodule.py will be installed in
48 # <prefix>/lib/python<version>/site-package/salome.
49 # The library will be installed in the same place.
50 #
51
52 # this option puts it to dist
53 #BUILT_SOURCES = swig_wrap.cpp
54
55 SWIG_FLAGS    = \
56         @SWIG_FLAGS@ \
57         -I$(srcdir) \
58         -I$(srcdir)/../SMESHGUI
59
60 SWIG_SOURCES  = libSMESH_Swig.i
61
62 # Libraries targets
63
64 lib_LTLIBRARIES = libSMESH_Swigcmodule.la
65
66 nodist_pkgpython_DATA = libSMESH_Swig.py
67 libSMESH_Swig.py: swig_wrap.cpp
68
69 libSMESH_Swigcmodule_la_SOURCES = \
70         $(BUILT_SOURCES) \
71         $(SWIG_SOURCES) \
72         ../SMESHGUI/SMESHGUI_Swig.cxx
73
74 nodist_libSMESH_Swigcmodule_la_SOURCES = \
75         swig_wrap.cpp
76
77 libSMESH_Swigcmodule_la_CPPFLAGS = \
78         $(QT_INCLUDES) \
79         $(PYTHON_INCLUDES) \
80         $(CAS_CPPFLAGS) \
81         $(VTK_INCLUDES) \
82         $(OGL_INCLUDES) \
83         $(KERNEL_CXXFLAGS) \
84         $(GUI_CXXFLAGS) \
85         $(MED_CXXFLAGS) \
86         $(GEOM_CXXFLAGS) \
87         $(CORBA_CXXFLAGS) \
88         $(CORBA_INCLUDES) \
89         $(BOOST_CPPFLAGS) \
90         -I$(srcdir)/../SMESHGUI \
91         -I$(top_builddir)/idl \
92         -I$(top_builddir)/salome_adm/unix
93
94 libSMESH_Swigcmodule_la_LDFLAGS  = \
95         ../SMESHGUI/libSMESH.la \
96         $(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace \
97         $(GUI_LDFLAGS) -lCAM -lsuit -lqtx -lSalomeApp -lstd -lEvent \
98         $(PYTHON_LIBS) \
99         $(QT_MT_LIBS)
100
101
102 swig_wrap.cpp : $(SWIG_SOURCES)
103         $(SWIG) $(SWIG_FLAGS) -o $@ $<
104
105 CLEANFILES = \
106         swig_wrap.cpp
107
108 # Scripts to be installed.
109 dist_salomescript_DATA= \
110         libSMESH_Swig.py
111
112 install-exec-hook: $(libdir)/_libSMESH_Swig.so
113
114 $(libdir)/_libSMESH_Swig.so:
115         ( cd $(libdir); ln -sf libSMESH_Swigcmodule.so _libSMESH_Swig.so; )