source: Makefile.gcj @ ca81c35

Last change on this file since ca81c35 was 1ef33906, checked in by zzz <zzz@…>, 15 years ago

2006-03-18 jrandom

  • Added a new graphs.jsp page to show all of the stats being harvested
  • Property mode set to 100644
File size: 4.2 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
25JAR_ROUTER=router.jar
26JAR_JBIGI=jbigi.jar
27JAR_XML=xml-apis.jar resolver.jar xercesImpl.jar
28JAR_CONSOLE=\
29            i2psnark.jar \
30            javax.servlet.jar \
31            commons-el.jar \
32            commons-logging.jar \
33            jasper-runtime.jar \
34            ant-apache-bcel.jar \
35            ant.jar \
36            jasper-compiler.jar \
37            org.mortbay.jetty.jar \
38            routerconsole.jar
39JAR_SUCKER=jdom.jar rome-0.7.jar sucker.jar
40LIBI2P_JARS=${JAR_BASE} ${JAR_CLIENTS} ${JAR_ROUTER} ${JAR_JBIGI}
41# unfortunately, its not quite ready for most end users, as the
42# ${JAR_CONSOLE} fails to compile with:
43# org/apache/commons/logging/impl/LogKitLogger.java: In class 'org.apache.commons.logging.impl.LogKitLogger':
44# .../LogKitLogger.java: In constructor '(java.lang.String)':
45# .../LogKitLogger.java:91: error: cannot find file for class org.apache.log.Hierarchy
46# .../LogKitLogger.java:91: error: cannot find file for class org.apache.log.Hierarchy
47# .../LogKitLogger.java:104: error: cannot find file for class org.apache.log.Hierarchy
48# .../LogKitLogger.java:104: confused by earlier errors, bailing out
49
50#${JAR_CONSOLE}\
51#${JAR_XML} \
52#${JAR_SUCKER}
53#${JAR_CONSOLE}
54
55SYSTEM_PROPS=-DloggerFilenameOverride=logs/log-router-@.txt \
56             -Dorg.mortbay.http.Version.paranoid=true \
57             -Dorg.mortbay.util.FileResource.checkAliases=false \
58             -Dorg.mortbay.xml.XmlParser.NotValidating=true
59#SYSTEM_PROPS=-Di2p.weakPRNG=true
60OPTIMIZE=-O2
61#OPTIMIZE=-O3
62
63LD_LIBRARY_PATH=${EXTRA_LD_PATH}:.
64
65all: jars native
66        @echo "* Build complete"
67
68jars:
69        @${ANT} ${ANT_TARGET}
70
71clean: native_clean
72
73native: native_clean native_shared
74        @echo "* Native code build in ${NATIVE}"
75
76native_clean:
77        @rm -rf ${NATIVE_DIR}
78        @mkdir ${NATIVE_DIR}
79
80native_shared: libi2p.so
81        @cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2p_dsa --main=net.i2p.crypto.DSAEngine
82        @echo "* i2p_dsa is a simple test app with the DSA engine and Fortuna PRNG to make sure crypto is working"
83        @cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/prng --main=gnu.crypto.prng.FortunaStandalone
84        @cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnel --main=net.i2p.i2ptunnel.I2PTunnel
85        @echo "* i2ptunnel is mihi's I2PTunnel CLI"
86        @echo "  run it as ./i2ptunnel -cli to avoid awt complaints"
87        @cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2ptunnelctl --main=net.i2p.i2ptunnel.TunnelControllerGroup
88        @echo "* i2ptunnelctl is a controller for I2PTunnel, reading i2ptunnel.config"
89        @echo "  and launching the appropriate proxies"
90        #@cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2psnark --main=org.klomp.snark.Snark
91        #@echo "* i2psnark is an anonymous bittorrent client"
92        @cd build ; ${GCJ} ${OPTIMIZE} -fjni -L../${NATIVE_DIR} -li2p ${SYSTEM_PROPS} -o ../${NATIVE_DIR}/i2prouter --main=net.i2p.router.Router
93        @echo "* i2prouter is the main I2P router"
94        @echo "  it can be used, and while the router console won't load,"
95        @echo "  i2ptunnel will, so it will start all the proxies defined in i2ptunnel.config"
96
97libi2p.so:
98        @echo "* Building libi2p.so"
99        @(cd build ; time ${GCJ} ${OPTIMIZE} -fPIC -fjni -shared -o ../${NATIVE_DIR}/libi2p.so ${LIBI2P_JARS} ; cd .. )
100        @ls -l ${NATIVE_DIR}/libi2p.so
101        @echo "* libi2p.so built"
Note: See TracBrowser for help on using the repository browser.