Salome HOME
Hexa6 : Mise ajour des sources
[modules/hexablock.git] / src / HEXABLOCK / make_swig
1 #!/bin/sh
2 # Comm : I'm swigging in the rain
3
4 module=hexablock_swig
5 bibli=`pwd`
6 bibli=`basename $bibli`
7
8 wrapped=${module}_wrap
9 wrap_src=$wrapped.cc
10
11 os=`uname`
12 shared=_$module.so
13 opt_pic=-fPIC
14 if ( [ $os != Linux ] ) then
15    shared=_$module.dll
16    opt_pic=
17    fi
18
19
20 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
21     do echo ; done
22
23 echo "  -- Je swigge ..."
24 swig -python -c++ -o $wrap_src -module ${module} ${module}.i
25
26 echo "  -- Je compile ..."
27 g++ $opt_pic -I/usr/include/python2.6 -c $wrap_src
28 echo "  -- Je linke ..."
29 g++ -fPIC -shared $wrapped.o -L. -l$bibli -lpython2.6 -o ${shared}
30 echo "  -- J'ai fini."
31