Salome HOME
Porting SMESH module to Qt 4
[modules/smesh.git] / src / SMESH_SWIG_WITHIHM / Makefile.am
1 # SMESH SMESHGUI : GUI for SMESH component
2 #
3 # Copyright (C) 2003  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 # File   : Makefile.am
23 # Author : Alexander BORODIN, Open CASCADE S.A.S.
24 #
25
26 include $(top_srcdir)/adm_local/unix/make_common_starter.am
27
28 # ===============================================================
29 # Swig targets
30 # ===============================================================
31 # (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
32 #
33 # Step 1: build the wrapping source files with swig
34 #
35 # libSALOME_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
36 #                                        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_Swigcmodule.py will be installed in
46 # <prefix>/lib/python<version>/site-package/salome.
47 # The library will be installed in the same place.
48 #
49
50 # this option puts it to dist
51 #BUILT_SOURCES = swig_wrap.cpp
52
53 salomeinclude_HEADERS = \
54         libSMESH_Swig.h \
55         libSMESH_Swig.i
56
57 SWIG_FLAGS    = \
58         @SWIG_FLAGS@ \
59         -I$(srcdir) \
60         -I$(srcdir)/../SMESHGUI
61
62 SWIG_SOURCES  = libSMESH_Swig.i
63
64 # Libraries targets
65
66 lib_LTLIBRARIES = libSMESH_Swigcmodule.la
67
68 nodist_pkgpython_DATA = libSMESH_Swig.py
69 libSMESH_Swig.py: swig_wrap.cpp
70
71 libSMESH_Swigcmodule_la_SOURCES = \
72         $(BUILT_SOURCES) \
73         $(SWIG_SOURCES) \
74         libSMESH_Swig.cxx
75
76 nodist_libSMESH_Swigcmodule_la_SOURCES = \
77         swig_wrap.cpp
78
79 libSMESH_Swigcmodule_la_CPPFLAGS = \
80         $(QT_INCLUDES) \
81         $(PYTHON_INCLUDES) \
82         $(CAS_CPPFLAGS) \
83         $(VTK_INCLUDES) \
84         $(OGL_INCLUDES) \
85         $(KERNEL_CXXFLAGS) \
86         $(GUI_CXXFLAGS) \
87         $(MED_CXXFLAGS) \
88         $(GEOM_CXXFLAGS) \
89         $(CORBA_CXXFLAGS) \
90         $(CORBA_INCLUDES) \
91         $(BOOST_CPPFLAGS) \
92         -I$(srcdir)/../SMESHGUI \
93         -I$(top_builddir)/idl \
94         -I$(top_builddir)/salome_adm/unix
95
96 libSMESH_Swigcmodule_la_LDFLAGS  = \
97         ../SMESHGUI/libSMESH.la \
98         $(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace \
99         $(GUI_LDFLAGS) -lCAM -lsuit -lqtx -lSalomeApp -lstd -lEvent \
100         $(PYTHON_LIBS) \
101         $(QT_MT_LIBS)
102
103
104 swig_wrap.cpp : $(SWIG_SOURCES)
105         $(SWIG) $(SWIG_FLAGS) -o $@ $<
106
107 CLEANFILES = \
108         swig_wrap.cpp
109
110 # Scripts to be installed.
111 dist_salomescript_DATA= \
112         libSMESH_Swig.py
113
114 install-exec-hook: $(libdir)/_libSMESH_Swig.so
115
116 $(libdir)/_libSMESH_Swig.so:
117         ( cd $(libdir); ln -sf libSMESH_Swigcmodule.so _libSMESH_Swig.so; )