-#==============================================================================
-# File : Makefile.in
-# Author : Nadir BOUHAMOU (CEA/DEN/DM2S/SFME/LGLS)
-# CVS : $Header$
-#==============================================================================
+# MED MedCorba_Swig : binding of MED CORBA objects woth Python
+#
+# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+#
+#
+#
+# File : Makefile.in
+# Author : Nadir BOUHAMOU (CEA/DEN/DM2S/SFME/LGLS)
+# Module : MED
-# source path
top_srcdir=@top_srcdir@
top_builddir=../..
srcdir=@srcdir@
-VPATH=.:$(srcdir):$(top_srcdir)/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome
+VPATH=.:$(srcdir):$(top_srcdir)/idl:$(top_builddir)/idl
@COMMENCE@
LIB_SRC =
+ifeq (@SWIG_VERSION@, 1.3.21)
+SWIG_DEF = libMedCorba_Swig.i dummy.i
+
+dummy_wrap.cxx: libMedCorba_Swig_wrap.cxx
+ sed -e 's/SwigValueWrapper< vector<FAMILY \* > >/vector<FAMILY \* >/g' libMedCorba_Swig_wrap.cxx > toto
+ mv toto libMedCorba_Swig_wrap.cxx
+ sed -e 's/SwigValueWrapper< vector<SUPPORT \* > const >/vector<SUPPORT \* >/g' libMedCorba_Swig_wrap.cxx > toto
+ mv toto libMedCorba_Swig_wrap.cxx
+ touch dummy_wrap.cxx
+else
SWIG_DEF = libMedCorba_Swig.i
+endif
+
+# libMedCorba_Swig.i depends on libMEDMEM_Swig.i:
+# %include "libMEDMEM_Swig.i"
+SWIG_DEP = libMEDMEM_Swig.i
LIB_SERVER_IDL = MED.idl
-LIB_CLIENT_IDL= SALOME_Component.idl SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl
+LIB_CLIENT_IDL= SALOME_Component.idl SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl SALOME_Comm.idl SALOME_GenericObj.idl
-EXPORT_PYSCRIPTS = libMedCorba_Swig.py medcorba_test.py batchmode_medcorba_test.py
+EXPORT_PYSCRIPTS = libMedCorba_Swig.py medcorba_test.py batchmode_medcorba_test.py batchmode_medcorba_test1.py
+
+EXPORT_HEADERS = libMedCorba_Swig.i
#############################################################################
+LDFLAGS= -L$(top_builddir)/lib/salome
+LDFLAGSFORBIN= -L$(top_builddir)/lib/salome
+
CPPFLAGS+= $(PYTHON_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
-CXXFLAGS=-g -D_DEBUG_ -D__x86__ -D__linux__
CXXFLAGS+=-ftemplate-depth-42 -I${KERNEL_ROOT_DIR}/include/salome
LIBS= $(PYTHON_LIBS)
-LDFLAGS+= -lMEDImpl -lMEDMEM_Swigcmodule -L${KERNEL_ROOT_DIR}/lib/salome
+#LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lMEDMEMImpl -lmedmem -lMEDMEM_Swigcmodule -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeLoggerServer -L${KERNEL_ROOT_DIR}/lib/salome
+# change motivated by the bug KERNEL4778.
+LDFLAGS+=$(MED2_LIBS) $(HDF5_LIBS) -lMEDMEMImpl -lmedmem -lMEDMEM_Swigcmodule -L${KERNEL_ROOT_DIR}/lib/salome -lSALOMELocalTrace
#############################################################################
MED.hh MEDSK.cc: MED.idl
- omniidl -bcxx -Wbtp -I$(top_builddir)/idl $^
+ omniidl -bcxx -Wbtp -I$(top_builddir)/idl -I${KERNEL_ROOT_DIR}/idl/salome $^
@CONCLUDE@