Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/yacs.git] / src / yacsloader_swig / Makefile.am
1 # Copyright (C) 2006-2012  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 include $(top_srcdir)/adm/unix/make_begin.am
21
22 if CPPUNIT_IS_OK
23 SUBDIRS = Test
24 endif
25
26 SWIG_PYTHON_INCLUDES = -noexcept -DYACS_PTHREAD -I$(srcdir)/../bases -I$(srcdir)/../engine_swig -I$(srcdir)/../engine \
27                                  -I$(srcdir)/../yacsloader -I../engine_swig
28
29 BUILT_SOURCES = loaderWRAP.cxx 
30
31 MYSWIG_FLAGS =
32
33 if DOXYGEN_IS_OK
34 MYSWIG_FLAGS += -DDOXYGEN_IS_OK
35 endif
36
37 LOADERINCLUDES=parsers.hxx LoadState.hxx xmlParserBase.hxx ProcCataLoader.hxx 
38
39 SWIGINCLUDES = $(LOADERINCLUDES:%=$(top_srcdir)/src/yacsloader/%)
40
41 loaderWRAP.cxx loaderWRAP.h: loader.i $(SWIGINCLUDES) docyacsloader.i ../engine_swig/pilot.i ../engine_swig/engtypemaps.i
42         $(SWIG) $(SWIG_PYTHON_OPT) $(SWIG_PYTHON_INCLUDES) $(MYSWIG_FLAGS) -o loaderWRAP.cxx $(srcdir)/loader.i
43
44 loader.py : loaderWRAP.cxx
45
46 salomepython_PYTHON = loader.py
47 salomepyexec_LTLIBRARIES = _loader.la
48
49 _loader_la_SOURCES =   \
50         loaderWRAP.cxx
51
52 _loader_la_CXXFLAGS = \
53         $(THREAD_DEF) \
54         $(PYTHON_CPPFLAGS) \
55         $(OMNIORB_INCLUDES) \
56         $(OMNIORB_CXXFLAGS) \
57         $(EXPAT_INCLUDES) \
58         -I$(srcdir)/../bases \
59         -I$(srcdir)/../engine \
60         -I$(srcdir)/../yacsloader
61
62 _loader_la_LDFLAGS  = -module 
63
64 _loader_la_LIBADD =  ../yacsloader/libYACSloader.la $(OMNIORB_LIBS) $(PYTHON_LIBS)
65
66 docyacsloader.i:$(SWIGINCLUDES)
67         DOXSRCDIR=$(top_srcdir)/src/yacsloader doxygen $(top_srcdir)/Misc/Doxyfile
68         $(PYTHON) $(top_srcdir)/Misc/doxy2swig.py -n xml/index.xml docyacsloader.i
69
70 EXTRA_DIST = loader.i
71
72 clean-local:
73         rm -f loader.py*  loaderWRAP.cxx docyacsloader.i loaderWRAP.h
74         rm -rf xml
75
76 include $(top_srcdir)/adm/unix/make_end.am