compiles
[org.ibex.mail.git] / Makefile
1 main: run
2
3 clean:      ; rm -rf build
4 dist-clean:
5         rm -rf .configure* .install* build .compile .build*
6
7 sources    := $(shell find src -name \*.java)
8 sources    += upstream/org.ibex.crypto/src/org/ibex/crypto/Base36.java
9
10 upstream/org.ibex.crypto/src/org/ibex/crypto/Base36.java: .download_org.ibex.crypto
11
12 .download_org.ibex.%:
13         @echo -e "\033[1mfetching repository                 org.ibex.$*\033[0m"
14         @mkdir -p upstream; cd upstream; rm -rf org.ibex.$*; rm -rf org.ibex.$*_*
15         @cd upstream; darcs get --verbose --partial --repo-name=org.ibex.$* http://$*.ibex.org
16         @touch $@
17
18 .build_org.ibex.%: .download_org.ibex.%
19         @echo -e "\033[1mbuilding repository                 org.ibex.$*\033[0m"
20         @cd upstream/org.ibex.$*; make compile
21         @touch $@
22
23 mail.jar: $(sources)
24         @make .download_org.ibex.crypto .build_org.ibex.core
25         @mkdir -p build/class
26         @javac -d build/class -classpath upstream/org.ibex.core/build/class $^
27         @cd build/class; jar cvf ../../mail.jar .
28
29 run: mail.jar
30         java -cp mail.jar:upstream/org.ibex.core/build/class org.ibex.mail.protocol.SMTP