source: Makefile.gcj @ 2f8a287

Last change on this file since 2f8a287 was 2f8a287, checked in by zzz <zzz@…>, 14 years ago

no more -Di2p.weakPRNG :)

  • Property mode set to 100644
File size: 2.7 KB
Line 
1# Makefile for building native I2P binaries and libraries with GCJ
2#
3# WARNING: Do not use this yet, as it may explode (etc).
4#
5GCJ=gcj #/usr/local/gcc-4.0.2/bin/gcj
6EXTRA_LD_PATH= #/usr/local/gcc-4.0.2/lib
7ANT=ant #/opt/apache-ant-1.6.5/bin/ant
8ANT_TARGET=buildclean
9NATIVE_DIR=native
10
11##
12# Define what jar files get into libi2p.so.  The current setup is
13# *incredibly* lazy, throwing everything in the .so, rather than
14# give each .jar file its own .so.
15#  i2p.jar: base SDK
16#  mstreaming.jar: streaming API
17#  streaming.jar: full streaming lib implementation
18#  i2ptunnel.jar: I2PTunnel proxy
19#  sam.jar: SAM bridge and API
20#  i2psnark.jar: bittorrent client
21#  router.jar: full I2P router
22#  jbigi.jar: collection of native optimized GMP routines for crypto
23JAR_BASE=i2p.jar mstreaming.jar streaming.jar
24JAR_CLIENTS=i2ptunnel.jar sam.jar i2psnark.jar
25JAR_ROUTER=router.jar
26JAR_JBIGI=jbigi.jar
27LIBI2P_JARS=${JAR_BASE} ${JAR_CLIENTS} ${JAR_ROUTER} ${JAR_JBIGI}
28
29SYSTEM_PROPS=
30#SYSTEM_PROPS=-Di2p.weakPRNG=true
31
32LD_LIBRARY_PATH=${EXTRA_LD_PATH}:.
33
34all: jars native
35        @echo "* Build complete"
36
37jars:
38        @${ANT} ${ANT_TARGET}
39
40clean: native_clean
41
42native: native_clean native_shared
43        @echo "* Native code build in ${NATIVE}"
44
45native_clean:
46        @rm -rf ${NATIVE_DIR}
47        @mkdir ${NATIVE_DIR}
48
49native_shared: libi2p.so
50        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2p_dsa --main=net.i2p.crypto.DSAEngine
51        @echo "* i2p_dsa is a simple test app with the DSA engine and Fortuna PRNG to make sure crypto is working"
52        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnel --main=net.i2p.i2ptunnel.I2PTunnel
53        @echo "* i2ptunnel is mihi's I2PTunnel CLI"
54        @echo "  run it as ./i2ptunnel -cli to avoid awt complaints"
55        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnelctl --main=net.i2p.i2ptunnel.TunnelControllerGroup
56        @echo "* i2ptunnelctl is a controller for I2PTunnel, reading i2ptunnel.config"
57        @echo "  and launching the appropriate proxies"
58        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2psnark --main=org.klomp.snark.Snark
59        @echo "* i2psnark is an anonymous bittorrent client"
60        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2prouter --main=net.i2p.router.Router
61        @echo "* i2prouter is the main I2P router"
62        @echo "  it can be used, and while the router console won't load,"
63        @echo "  i2ptunnel will, so it will start all the proxies defined in i2ptunnel.config"
64
65libi2p.so:
66        @echo "* Building libi2p.so"
67        @(cd build ; ${GCJ} -fPIC -fjni -shared -o ../${NATIVE_DIR}/libi2p.so ${LIBI2P_JARS} ; cd .. )
68        @ls -l ${NATIVE_DIR}/libi2p.so
69        @echo "* libi2p.so built"
Note: See TracBrowser for help on using the repository browser.