#!/bin/sh
# Copyright (C) 2009-2016  CEA/DEN, EDF R&D
#
# 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, or (at your option) any later version.
#
# 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
#

# Comm : I'm swigging in the rain

module=hexablock_swig
bibli=`pwd`
bibli=`basename $bibli`

wrapped=${module}_wrap
wrap_src=$wrapped.cc

os=`uname`
shared=_$module.so
opt_pic=-fPIC
if ( [ $os != Linux ] ) then
   shared=_$module.dll
   opt_pic=
   fi


for a in a a a a a a a a a a a a a a a a a a a a a a a
    do echo ; done

echo "  -- Creation de $wrap_src  ..."
swig -python -c++ -o $wrap_src -I../HEXABLOCK -module ${module} ${module}.i

## echo "  -- Je compile ..."
## g++ $opt_pic -I../HEXABLOCK -I/usr/include/python2.5 -c $wrap_src
##echo "  -- Je linke ..."
##g++ -fPIC -shared $wrapped.o -L. -l$bibli -lpython2.6 -o ${shared}
echo "  -- J'ai fini."

