source: core/c/build.sh @ e8a2130

Last change on this file since e8a2130 was e8a2130, checked in by zzz <zzz@…>, 18 years ago

updated for new paths / mingw setup

  • Property mode set to 100644
File size: 978 bytes
Line 
1#!/bin/sh
2# linux settings:
3CC="gcc"
4ANT="ant"
5JAVA="java"
6
7COMPILEFLAGS="-fPIC -Wall"
8LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
9
10INCLUDES="-Iinclude -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
11INCLUDELIBS="-lgmp"
12STATICLIBS=""
13
14LIBFILE="libjbigi.so"
15
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"
23
24rm -f jbigi.o $LIBFILE
25$CC -c $COMPILEFLAGS $INCLUDES src/jbigi.c
26$CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS
27
28echo "built, now testing"
29(cd ../java/ ; $ANT build)
30LD_LIBRARY_PATH=. $JAVA -cp ../java/build/i2p.jar -DloggerConfigLocation=../../installer/java/src/logger.config.template net.i2p.util.NativeBigInteger
31
32
33echo ""
34echo ""
35echo "test complete.  please review the lines 'native run time:', 'java run time:', and 'native = '"
Note: See TracBrowser for help on using the repository browser.