source: Makefile.gcj @ 3fbc6f4

Last change on this file since 3fbc6f4 was 3fbc6f4, checked in by zzz <zzz@…>, 15 years ago

first pass gcj makefile
I have no idea what I'm doing, this just shows you how to do it ;)

  • Property mode set to 100644
File size: 3.0 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
29# The i2p.weakPRNG uses java.util.Random to generate random values from.
30# This is Not Good.  Remove this once java.security.SecureRandom works
31SYSTEM_PROPS=-Di2p.weakPRNG=true
32
33LD_LIBRARY_PATH=${EXTRA_LD_PATH}:.
34
35all: jars native
36        @echo "* Build complete"
37
38jars:
39        @${ANT} ${ANT_TARGET}
40
41clean: native_clean
42
43native: native_clean native_shared
44        @echo "* Native code build in ${NATIVE}"
45
46native_clean:
47        @rm -rf ${NATIVE_DIR}
48        @mkdir ${NATIVE_DIR}
49
50native_shared: libi2p.so
51        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2p_dsa --main=net.i2p.crypto.DSAEngine
52        @echo "* i2p_dsa is a simple test app with the weak PRNG to make sure crypto is working"
53        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p -o ../${NATIVE_DIR}/i2p_dsa_prng --main=net.i2p.crypto.DSAEngine
54        @echo "* i2p_dsa_prng is i2p_dsa with the real PRNG"
55        @echo "  it will hang forever until we get the PRNG issue solved"
56        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnel --main=net.i2p.i2ptunnel.I2PTunnel
57        @echo "* i2ptunnel is mihi's I2PTunnel CLI"
58        @echo "  run it as ./i2ptunnel -cli to avoid awt complaints"
59        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnelctl --main=net.i2p.i2ptunnel.TunnelControllerGroup
60        @echo "* i2ptunnelctl is a controller for I2PTunnel, reading i2ptunnel.config"
61        @echo "  and launching the appropriate proxies"
62        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2psnark --main=org.klomp.snark.Snark
63        @echo "* i2psnark is an anonymous bittorrent client"
64        @cd build ; ${GCJ} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2prouter --main=net.i2p.router.Router
65        @echo "* i2prouter is the main I2P router"
66        @echo "  it can be used, and while the router console won't load,"
67        @echo "  i2ptunnel will, so it will start all the proxies defined in i2ptunnel.config"
68
69libi2p.so:
70        @echo "* Building libi2p.so"
71        @(cd build ; ${GCJ} -fPIC -fjni -shared -o ../${NATIVE_DIR}/libi2p.so ${LIBI2P_JARS} ; cd .. )
72        @ls -l ${NATIVE_DIR}/libi2p.so
73        @echo "* libi2p.so built"
Note: See TracBrowser for help on using the repository browser.