echo "Compilation of CommDB Editor and Utilities"
echo "=========================================="

echo "Compile /com/symbian/commdb/data/ directory"
rm ../com/symbian/commdb/data/*.class
javac -g:none -source 1.4 -target 1.4 -O -classpath ../ ../com/symbian/commdb/data/*.java

echo "Compile /com/symbian/commdb/convert/ directory"
rm ../com/symbian/commdb/convert/*.class
javac -g:none -source 1.4 -target 1.4 -O -classpath ../ ../com/symbian/commdb/convert/*.java

echo "Compile /com/symbian/commdb/ui/ directory"
rm ../com/symbian/commdb/ui/*.class
javac -g:none -source 1.4 -target 1.4 -O -classpath ../ ../com/symbian/commdb/ui/*.java

echo "Compile /com/symbian/commdb/xml/ directory"
rm ../com/symbian/commdb/xml/*.class
javac -g:none -source 1.4 -target 1.4 -O -classpath ../ ../com/symbian/commdb/xml/*.java

echo "Generate JAR files"
rm *.jar
cd ..
jar cvfm bin/cxmled.jar bin/Manifest-cxmled.mf com/symbian/commdb/data/*.class com/symbian/commdb/ui/*.class com/symbian/commdb/xml/*.class com/symbian/commdb/various/*
jar cvfm bin/cfg2xml.jar bin/Manifest-cfg2xml.mf com/symbian/commdb/data/*.class com/symbian/commdb/convert/*.class com/symbian/commdb/xml/*.class
cd bin