As part of gentoo linux[1] packaging java-servier-wrapper we have produced a patch and sed'd the make files to correspond with our packaging standards.
Patch separates out building of tests and main code.
Patch also expects to find junit in a lib directory when compiling the test cases only. Currently ant provides the junit dependency. It is gentoo java policy that all dependencies should be explicit. We therefore pass build.sysclasspath=ignore to ant.
We also sed your make files to respect users CFLAGS
sed -i -e 's|gcc -O3 -Wall --pedantic|$(CC) $(CFLAGS) -fPIC|g' "src/c/Makefile-linux-x86-${BITS}"
sed -i -e 's|gcc -O3 -fPIC -Wall --pedantic|$(CC) $(CFLAGS) -fPIC|g' "src/c/Makefile-linux-x86-${BITS}"
I also noticed that you require the property 'bits' to be passed to ant. I believe it is possible to do this within your ant's build.xml file. jogl and gluegen have quite detailed CPU/compiler detection ( everything from window, linux, solaris, etc) to ( x86, amd64, sparc*, etc, etc). This may prove interesting and helpful to you.
Thanks and good luck with the next release.
Alistair
ali_bush@gentoo.org
[1] www.gentoo.org
/home/alistair/gentoo/cvs/gentoo-x86/dev-java/java-service-wrapper/files/java-service-wrapper-3.2.3-build.xml.patch