]> git.sesse.net Git - mlt/blob - src/swig/tcl/build
Further integrate swig into build system.
[mlt] / src / swig / tcl / build
1 #!/bin/sh
2
3 if [ "$1" = "clean" ]
4 then
5         ( cd `dirname $0`; rm -f *.cxx *.so mlt.i ../.tcl )
6         exit 0
7 fi
8
9 path=`which tclsh 2>/dev/null`
10
11 if [ "$path" != "" ]
12 then
13         ln -sf ../mlt.i
14
15         # Invoke swig
16         swig -c++ -I../../mlt++ -I../.. -tcl mlt.i || exit 1
17
18         # Compile the wrapper
19         g++ -D_GNU_SOURCE -c -rdynamic -pthread -I../.. mlt_wrap.cxx || exit 1
20
21         # Create the module
22         gcc -shared mlt_wrap.o -L../../mlt++ -lmlt++ -o mlt.so || exit 1
23 else
24         echo "Unable to locate tclsh."
25         exit 1
26 fi
27