Files
i2p.android.base/core/c
sponge 0c98d1843a Sponge fixes and additions patch:
* 3 New jbigi build scripts and old ones fixed to work properly.
    * Some trivial BOB work.
2009-03-30 05:31:40 +00:00
..
2009-03-30 05:31:40 +00:00
2008-02-21 14:53:50 +00:00
2008-02-21 14:53:50 +00:00
2009-03-30 05:31:40 +00:00
2008-05-12 13:47:15 +00:00

If you have a libgmp.so installed on your system already
(check in /usr/lib), you can build a dynamically linked libjbigi.so as follows:
	cd jbigi
	build.sh dynamic
The built library is jbigi/lib/libjbigi.so .
	
Otherwise, prior to building the jbigi library, you will need to fetch the GMP source
from http://www.swox.com/gmp/, saving it to jbigi/gmp-4.2.2.tar.bz2 (it will
be unpacked and built as necessary).

Version 4.2.2 has not been extensively tested with I2P. If you would like
to use a well-tested version, get gmp-4.1.4.tar.bz2, and edit jbigi/build.sh
to change the version number.

To build the native jbigi and jcpuid libraries for the current host CPU,
simply run sh build.sh and the results will be packaged up into jbigi.jar
and the libjbigi.so library. To test, copy jbigi/lib/libjbigi.so
and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
to your i2p/ directory. You can also copy jbigi.jar to the i2p/lib/ directory;
it will be used only if the router fails to load the native library.

To build the native jbigi libraries for all supported CPUs (on the current OS),
go into jbigi/ and run build-all.sh (the results will be under jbigi/lib/)

The build.sh script runs two speed tests, one with your existing
I2P installation and one with the new libjbigi.

Alternatively, after copying the files to the i2p/ directory,
to run a speed test comparing the native library to the java library,
run the shell script below. Adjust the I2P= line as necessary.

-----------------

#!/bin/sh
export I2P=~/i2p
java -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger