aboutsummaryrefslogtreecommitdiffstats
path: root/tests/foobinding
diff options
context:
space:
mode:
Diffstat (limited to 'tests/foobinding')
-rw-r--r--tests/foobinding/Makefile13
-rw-r--r--tests/foobinding/foo/Makefile21
-rw-r--r--tests/foobinding/global.h2
-rw-r--r--tests/foobinding/typesystem_foo.xml6
4 files changed, 42 insertions, 0 deletions
diff --git a/tests/foobinding/Makefile b/tests/foobinding/Makefile
new file mode 100644
index 000000000..30909aeeb
--- /dev/null
+++ b/tests/foobinding/Makefile
@@ -0,0 +1,13 @@
+all: generate
+ (cd foo; $(MAKE))
+
+generate:
+ boostpythongenerator --disable-named-arg global.h \
+ --include-paths=`pwd`/../libfoo \
+ --typesystem-paths=. --output-directory=. \
+ typesystem_foo.xml
+
+clean:
+ rm *.log .preprocessed.tmp foo/*.hpp foo/*.cpp -rf
+ (cd foo; $(MAKE) clean)
+
diff --git a/tests/foobinding/foo/Makefile b/tests/foobinding/foo/Makefile
new file mode 100644
index 000000000..4f6896f46
--- /dev/null
+++ b/tests/foobinding/foo/Makefile
@@ -0,0 +1,21 @@
+CXX_FLAGS=-DBOOST_PYTHON_NO_PY_SIGNATURES -g -fPIC -I/usr/include/python2.5 -I../../libfoo `pkg-config pyside --cflags`
+CXX_LDFLAGS=-DBOOST_PYTHON_NO_PY_SIGNATURES -fPIC -shared -L../../libfoo -lfoo `pkg-config pyside --libs`
+
+all: foo_wrapper.o bar_wrapper.o foo_globals_wrapper.o foo_module_wrapper.o
+ g++ $(CXX_LDFLAGS) bar_wrapper.o foo_wrapper.o foo_globals_wrapper.o foo_module_wrapper.o -Wl,-soname,foo.so -o foo.so
+
+foo_wrapper.o: foo_wrapper.cpp foo_wrapper.hpp
+ g++ $(CXX_FLAGS) foo_wrapper.cpp -c
+
+bar_wrapper.o: bar_wrapper.cpp bar_wrapper.hpp
+ g++ $(CXX_FLAGS) bar_wrapper.cpp -c
+
+foo_globals_wrapper.o: foo_globals_wrapper.cpp
+ g++ $(CXX_FLAGS) foo_globals_wrapper.cpp -c
+
+foo_module_wrapper.o: foo_module_wrapper.cpp
+ g++ $(CXX_FLAGS) foo_module_wrapper.cpp -c
+
+clean:
+ rm *.o *.so -rf
+
diff --git a/tests/foobinding/global.h b/tests/foobinding/global.h
new file mode 100644
index 000000000..a23601a31
--- /dev/null
+++ b/tests/foobinding/global.h
@@ -0,0 +1,2 @@
+#include "foo.h"
+#include "bar.h"
diff --git a/tests/foobinding/typesystem_foo.xml b/tests/foobinding/typesystem_foo.xml
new file mode 100644
index 000000000..e4289e406
--- /dev/null
+++ b/tests/foobinding/typesystem_foo.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<typesystem package="foo">
+ <object-type name="Foo"/>
+ <object-type name="Bar"/>
+</typesystem>
+