Salome HOME
Using AutoTools for build procedure
[modules/smesh.git] / src / SMESH_SWIG / 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         -I$(srcdir)/../SMESHGUI \
90         -I$(top_builddir)/idl \
91         -I$(top_builddir)/salome_adm/unix
92
93 libSMESH_Swigcmodule_la_LDFLAGS  = \
94         ../SMESHGUI/libSMESH.la \
95         $(KERNEL_LDFLAGS) -lSalomeGenericObj -lSALOMELocalTrace \
96         $(GUI_LDFLAGS) -lCAM -lsuit -lqtx -lSalomeApp -lstd -lEvent \
97         $(PYTHON_LIBS) \
98         $(QT_MT_LIBS)
99
100
101 swig_wrap.cpp : $(SWIG_SOURCES)
102         $(SWIG) $(SWIG_FLAGS) -o $@ $<
103
104 CLEANFILES = \
105         swig_wrap.cpp
106
107 # Scripts to be installed.
108 dist_salomescript_DATA= \
109         libSMESH_Swig.py \
110         smesh.py \
111         batchmode_smesh.py \
112         batchmode_mefisto.py \
113         ex00_all.py \
114         ex01_cube2build.py \
115         ex02_cube2primitive.py \
116         ex03_cube2partition.py \
117         ex04_cube5tetraHexa.py \
118         ex05_hole1build.py \
119         ex06_hole1boolean.py \
120         ex07_hole1partition.py \
121         ex08_hole2build.py \
122         ex09_grid4build.py \
123         ex10_grid4geometry.py \
124         ex11_grid3partition.py \
125         ex12_grid17partition.py \
126         ex13_hole1partial.py \
127         ex14_cyl1holed.py \
128         ex15_cyl2geometry.py \
129         ex16_cyl2complementary.py \
130         ex17_dome1.py \
131         ex18_dome2.py \
132         ex19_sphereINcube.py \
133         ex21_lamp.py \
134         SMESH_test.py\
135         SMESH_test0.py\
136         SMESH_test1.py \
137         SMESH_test1_AndDisplay.py \
138         SMESH_test2.py \
139         SMESH_test3.py \
140         SMESH_test4.py \
141         SMESH_test5.py \
142         SMESH_mechanic.py \
143         SMESH_mechanic_tetra.py \
144         SMESH_mechanic_editor.py \
145         SMESH_mechanic_netgen.py \
146         SMESH_fixation.py \
147         SMESH_fixation_hexa.py \
148         SMESH_fixation_tetra.py \
149         SMESH_fixation_netgen.py \
150         SMESH_box_tetra.py \
151         SMESH_box2_tetra.py \
152         SMESH_box3_tetra.py \
153         SMESH_flight_skin.py \
154         SMESH_Partition1_tetra.py\
155         SMESH_controls.py \
156         SMESH_freebord.py \
157         SMESH_blocks.py \
158         SMESH_BelongToGeom.py \
159         SMESH_GroupFromGeom2.py \
160         SMESH_box.py \
161         SMESH_demo_hexa2_upd.py \
162         SMESH_hexaedre.py \
163         SMESH_Sphere.py \
164         SMESH_GroupFromGeom.py \
165         SMESH_Nut.py \
166         SMESH_GroupLyingOnGeom.py \
167         PAL_MESH_041_mesh.py \
168         PAL_MESH_043_2D.py \
169         PAL_MESH_043_3D.py \
170         SMESH_reg.py
171
172 EXPORT_SHAREDPYSCRIPTS = \
173         SMESH_shared_modules.py
174
175 install-exec-hook: $(libdir)/_libSMESH_Swig.so
176
177 $(libdir)/_libSMESH_Swig.so:
178         ln -sf $(libdir)/libSMESH_Swigcmodule.so $@