--- /dev/null
+CXX = g++
+ASMRUN = asmrun_shared
+
+all: libtatoo-java.so
+# cp $< ../../bin
+
+
+%.class: %.java
+ javac -cp . $<
+
+fxslt_memory_Tree.stamp: fxslt/memory/TatooEngine.class fxslt/memory/MutableNodeList.class
+ javah -jni fxslt.memory.TatooEngine
+ touch fxslt_memory_Tree.stamp
+
+fxslt_memory_TatooEngine.h: fxslt/memory/TatooEngine.class fxslt/memory/MutableNodeList.class
+
+TatooEngine.o: TatooEngine.cc fxslt_memory_Tree.stamp tatoo.h
+ $(CXX) -I `ocamlc -where` -DNDEBUG=1 -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux -fPIC \
+ -DPIC -std=c++0x -c -O3 -o $@ $< -Wall -Wextra -Wno-unused-parameter -g3
+
+libtatoo-java.so: TatooEngine.o tatoo-java.o
+ $(CXX) -shared -o $@ -O3 tatoo-java.o TatooEngine.o `ocamlc -where`/libasmrun.a `ocamlc -where`/libunix.a `ocamlc -where`/libbigarray.a -Wl,-soname,libtatoo-java.so
+tatoo_driver.depx tatoo_driver.cmx: tatoo_driver.ml
+ ../../../remake $@
+
+tatoo-java.o: tatoo_driver.cmx tatoo_driver.depx
+ ocamlfind ocamlopt -output-obj -o $@ -I ../.. -cc g++ -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 $(GEN_HEADERS) fxslt/memory/*.class
+ rm -f *.cm* *.depx *.o TatooTest.class *.so