fixups
[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 .download_org.ibex.%:
11         @echo -e "\033[1mfetching repository                 org.ibex.$*\033[0m"
12         @mkdir -p upstream; cd upstream; rm -rf org.ibex.$*; rm -rf org.ibex.$*_*
13         @cd upstream; darcs get --verbose --partial --repo-name=org.ibex.$* http://$*.ibex.org
14         @touch $@
15
16 .build_org.ibex.%:
17         @echo -e "\033[1mbuilding repository                 org.ibex.$*\033[0m"
18         @cd upstream/org.ibex.$*; make compile
19         @touch $@
20
21 mail.jar: $(sources)
22         @make .download_org.ibex.crypto .build_org.ibex.core
23         @mkdir -p build/class
24         @javac -d build/class -classpath upstream/org.ibex.core/build/class $^
25         @cd build/class; jar cvf ../../mail.jar .
26
27 run: mail.jar
28         java -cp mail.jar:upstream/org.ibex.core/build/class org.ibex.mail.protocol.SMTP