Changeset f7f05cf for core/c


Ignore:
Timestamp:
Aug 21, 2004 7:56:53 AM (16 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
6052a93
Parents:
f4754d7
git-author:
jrandom <jrandom> (08/21/04 07:56:53)
git-committer:
zzz <zzz@…> (08/21/04 07:56:53)
Message:

imported Iakin's public domain jcpuid library allowing the detection of CPU types from java
imported Iakin's modifications to jbigi to use the jcpuid library in detecting what jbigi implementation to load
imported and slightly updated Iakin's scripts to build jbigi for lots of architectures
(yay iakin!)

Location:
core/c
Files:
14 added
1 edited

Legend:

Unmodified
Added
Removed
  • core/c/build.sh

    rf4754d7 rf7f05cf  
    1 #!/bin/sh
    2 # linux settings:
    3 CC="gcc"
    4 ANT="ant"
    5 JAVA="java"
     1#/bin/sh
    62
    7 COMPILEFLAGS="-fPIC -Wall"
    8 LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
     3(cd jcpuid ; sh build.sh ; cd ..)
     4(cd jbigi ; sh build.sh ; cd ..)
    95
    10 INCLUDES="-Iinclude -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
    11 INCLUDELIBS="-lgmp"
    12 STATICLIBS=""
     6mkdir -p t/freenet/support/CPUInformation/
     7cp jcpuid/lib/freenet/support/CPUInformation/*jcpuid-* t/freenet/support/CPUInformation/
    138
    14 LIBFILE="libjbigi.so"
     9mkdir -p t/net/i2p/util/
     10cp jbigi/lib/net/i2p/util/*jbigi-* t/net/i2p/util/
    1511
    16 # jrandom's mingw setup:
    17 #COMPILEFLAGS="-Wall"
    18 #INCLUDES="-Iinclude -Ic:/software/j2sdk1.4.2/include/win32/ -Ic:/software/j2sdk1.4.2/include/ -Ic:/dev/gmp-4.1.2/"
    19 #LINKFLAGS="-shared -Wl,--kill-at"
    20 #LIBFILE="jbigi.dll"
    21 #INCLUDELIBS=""
    22 #STATICLIBS="libgmp.a"
     12(cd t ; jar cf ../jbigi.jar . ; cd ..)
    2313
    24 echo "Compiling C code..."
    25 rm -f jbigi.o $LIBFILE
    26 $CC -c $COMPILEFLAGS $INCLUDES src/jbigi.c
    27 $CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS
    28 
    29 echo ""
    30 echo "Doing an ant build..."
    31 (cd ../java/ ; $ANT build)
    32 
    33 echo ""
    34 echo "Built, now testing... This will take a while."
    35 LD_LIBRARY_PATH=. $JAVA -cp ../java/build/i2p.jar -DloggerConfigLocation=../../installer/java/src/logger.config.template net.i2p.util.NativeBigInteger
    36 
    37 
    38 echo ""
    39 echo ""
    40 echo "Test complete. Please review the lines 'native run time:', 'java run time:', and 'native = '"
     14echo "Native code built into jbigi.jar"
Note: See TracChangeset for help on using the changeset viewer.