Salome HOME
fb72e60a7467f049d0094d7ff5880ebc5904b7f4
[samples/component.git] / src / SIGNALSComponent_Swig / Makefile.am
1 #  SuperVisionTest SIGNALSComponent : example of component that devides two numbers
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 #
23 #
24 #  File   : Makefile.in
25 #  Author : , CEA
26 #  Modified by : Alexander BORODIN (OCN) - autotools usage
27 #  Module : SuperVisionTest
28 #  $Header: 
29
30 include $(top_srcdir)/adm_local/unix/make_common_starter.am
31
32 # ===============================================================
33 # Swig targets
34 # ===============================================================
35 # (cf. http://www.geocities.com/foetsch/python/swig_linux.htm)
36 #
37 # Step 1: build the wrapping source files with swig
38 #
39 # libSALOME_LifeCycleCORBA.i -- swig --> swig_wrap.cpp
40 #                                        libSALOME_Swig.py
41 #
42 # Step 2: build the dynamic library from cpp built source files and
43 #         dependant libraries.
44 #
45 # swig_wrap.cpp -- gcc --> swig_wrap.o    |-- link --> _libSALOME_Swig.la
46 #                          +              |
47 #                          dependant libs |
48 #
49 # The file libSALOME_Swigcmodule.py will be installed in
50 # <prefix>/lib/python<version>/site-package/salome.
51 # The library will be installed in the same place.
52 #
53
54 # this option puts it to dist
55 #BUILT_SOURCES = swig_wrap.cpp
56
57 SWIG_FLAGS    = \
58         @SWIG_FLAGS@ \
59         -I$(srcdir)
60
61 SWIG_SOURCES  = libSIGNALSComponent_Swig.i
62
63 # Libraries targets
64 lib_LTLIBRARIES = libSIGNALSComponent_Swigcmodule.la
65
66 nodist_pkgpython_DATA = libSIGNALSComponent_Swig.py
67 libSMESH_Swig.py: swig_wrap.cpp
68
69 libSIGNALSComponent_Swigcmodule_la_SOURCES = \
70         $(BUILT_SOURCES) \
71         $(SWIG_SOURCES)
72
73 nodist_libSIGNALSComponent_Swigcmodule_la_SOURCES = swig_wrap.cpp
74
75 libSIGNALSComponent_Swigcmodule_la_CPPFLAGS = \
76         $(PYTHON_INCLUDES) \
77         $(CORBA_CXXFLAGS) \
78         $(CORBA_INCLUDES) \
79         $(KERNEL_CXXFLAGS) \
80         -I$(srcdir)/../SIGNALSComponent \
81         -I$(top_builddir)/idl \
82         -I$(top_builddir)/salome_adm/unix
83
84 libSIGNALSComponent_Swigcmodule_la_LDFLAGS  = \
85         ../SIGNALSComponent/libSIGNALSComponentEngine.la \
86         $(KERNEL_LDFLAGS) \
87         -lSalomeContainer \
88         -lSalomeNS \
89         -lOpUtil \
90         -lRegistry \
91         -lSalomeNotification
92
93 swig_wrap.cpp : $(SWIG_SOURCES)
94         $(SWIG) $(SWIG_FLAGS) -o $@ $<
95
96 CLEANFILES = \
97         swig_wrap.cpp
98
99 install-exec-hook: $(libdir)/_libSIGNALSComponent_Swig.so
100
101 $(libdir)/_libSIGNALSComponent_Swig.so:
102         ( cd $(libdir); ln -sf libSIGNALSComponent_Swigcmodule.so _libSIGNALSComponent_Swig.so; )