jaxp := /usr/share/java/jaxp-1.3.jar gcj_jar := /usr/share/java/libgcj.jar run: domencoding.class domencoding jaxp @echo ruby domencoding.rb test.xml @echo java domencoding test.xml @echo ./domencoding test.xml @echo cd jaxp; ruby -r jaxp -e 'include Jaxp; puts parse("../test.xml")' %.class: %.java javac $< domencoding: domencoding.cpp \ headers/javax/xml/parsers/DocumentBuilderFactory.h \ headers/javax/xml/parsers/DocumentBuilder.h \ headers/org/w3c/dom/Document.h g++ -Iheaders -lgcj -o $@ $< headers/%.h: @test -d $(dir $@) || mkdir -p $(dir $@) gcjh -cp $(jaxp):$(gcj_jar) \ -o $@ $(subst /,.,$(subst headers/,,$(@:.h=))) jaxp: domencoding cd jaxp; make clean: rm -f domencoding rm -f *.class rm -rf headers cd jaxp; make clean