--- /dev/null
+CXX = g++
+
+all: tatoo-c++
+
+tatoo-engine.o: tatoo-engine.cc tatoo.h
+ $(CXX) -I `ocamlc -where` `pkg-config libxml-2.0 --cflags` -DNDEBUG -fPIC \
+ -DPIC -std=c++0x -c -O3 -o $@ $< -Wall -Wextra -Wno-unused-parameter
+
+tatoo-c++: tatoo-engine.o tatoo-driver.o
+ $(CXX) -o $@ -O3 tatoo-driver.o tatoo-engine.o -ldl -lrt `pkg-config libxml-2.0 --libs` \
+ -L`ocamlc -where` -lasmrun -lunix -lbigarray
+
+tatoo_driver.depx tatoo_driver.cmx: tatoo_driver.ml
+ ../../../remake $@
+
+tatoo-driver.o: tatoo_driver.cmx tatoo_driver.depx
+ ocamlfind ocamlopt -output-obj -o $@ -I ../.. -cc $(CXX) -linkall -linkpkg -package bigarray,ulex,unix $(shell cat tatoo_driver.depx | sed -e 's:src:../..:g' | sed -e 's:depx:cmx:g' ) $<
+
+test: TatooTest.class libtatoo-java.so
+ java -cp . -Xss80m -Djava.library.path=. TatooTest ../../../tests/xmark_0.50.xml '/descendant::keyword[ancestor::listitem]/*'
+
+clean:
+ rm -f *.cm* *.depx *.o TatooTest.class tatoo-c++