Experimental swig bindings
[melted] / mlt++ / swig / tcl / build
diff --git a/mlt++/swig/tcl/build b/mlt++/swig/tcl/build
new file mode 100755 (executable)
index 0000000..48d06c6
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+path=`which tclsh 2>/dev/null`
+
+if [ "$path" != "" ]
+then
+       ln -sf ../mltpp.i .
+
+       # Invoke swig
+       swig -c++ -I/usr/local/include/mlt++ `mlt-config --cflags` -tcl mltpp.i || exit 1
+
+       # Compile the wrapper
+       g++ -D_GNU_SOURCE -c -rdynamic -pthread -I/usr/local/include/mlt++ `mlt-config --cflags` mltpp_wrap.cxx || exit 1
+
+       # Create the module
+       ld -shared mltpp_wrap.o -lmlt++ -o mltpp.so || exit 1
+else
+       echo "Unable to locate tclsh."
+       exit 1
+fi
+