Salome HOME
merge from branch BR_V5_DEV
[modules/yacs.git] / src / Batch_SWIG / Makefile.am
1 #  Copyright (C) 2007-2008  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 #  File   : Makefile.am
23 #  Author : Guillaume Boulant (CSSI)
24 #  Module : KERNEL
25 #  $Header$
26 #
27 include $(top_srcdir)/salome_adm/unix/make_common_starter.am
28
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 # libBatch_Swig.i -- swig --> swig_wrap.cpp
38 #                             libBatch_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 --> _libBatch_Swig.la
44 #                          +              |
45 #                          dependant libs |
46 #
47 # The file libBatch_Swig.py will be installed in
48 # <prefix>/lib/python<version>/site-package/salome.
49 # The library will be installed in the common place.
50 #
51
52 BUILT_SOURCES = swig_wrap.cpp libBatch_Swig.py
53
54 SWIG_FLAGS    = @SWIG_FLAGS@ -I$(srcdir) -I$(srcdir)/../Batch
55 SWIGSOURCES  = libBatch_Swig.i libBatch_Swig_exception.i libBatch_Swig_typemap.i
56
57 salomepython_PYTHON           = libBatch_Swig.py
58 salomepyexec_LTLIBRARIES      = _libBatch_Swig.la
59 _libBatch_Swig_la_SOURCES  = swig_wrap.cpp
60 _libBatch_Swig_la_CPPFLAGS = @PYTHON_INCLUDES@ -I$(srcdir) -I$(srcdir)/../Batch
61 _libBatch_Swig_la_LDFLAGS  = -module
62 _libBatch_Swig_la_LIBADD   = ../Batch/libSalomeBatch.la @PYTHON_LIBS@
63
64 if WITH_OPENPBS
65 _libBatch_Swig_la_CPPFLAGS += @OPENPBS_INCLUDES@
66 _libBatch_Swig_la_LIBADD   += @OPENPBS_LIBDIR@ @OPENPBS_LIBS@
67 endif
68
69 swig_wrap.cpp libBatch_Swig.py : $(SWIGSOURCES)
70         $(SWIG) $(SWIG_FLAGS) -o swig_wrap.cpp $<
71
72 CLEANFILES = swig_wrap.cpp
73
74 EXTRA_DIST = $(SWIGSOURCES)
75
76 #
77 # ===============================================================
78 # Files to be installed
79 # ===============================================================
80 #
81
82 # Scripts to be installed.
83 dist_salomescript_SCRIPTS = Batch_test.py
84
85 # You don't need to specify libBatch_Swig.py. It is automatically
86 # installed by means of the swig target salomepython_PYTHON.