author | viric@llimona |
Wed, 11 Jul 2007 10:31:35 +0200 | |
changeset 18 | 6ffc769ebf94 |
parent 9 | 9f8e342f193e |
permissions | -rw-r--r-- |
0 | 1 |
# PRJ |
2 |
PRJ=horaris |
|
3 |
VENDOR=viric |
|
9
9f8e342f193e
Moving from MIDP2/CLDC1.1 to MIDP1/CLDC1.0. Added About windows.
viric@mandarina
parents:
0
diff
changeset
|
4 |
VERSION=0.7 |
0 | 5 |
|
6 |
# RTE |
|
7 |
WTK2?=/opt/wtk2.2 |
|
8 |
EMULATOR=${WTK2}/bin/emulator |
|
9
9f8e342f193e
Moving from MIDP2/CLDC1.1 to MIDP1/CLDC1.0. Added About windows.
viric@mandarina
parents:
0
diff
changeset
|
9 |
CLASSPATH=${WTK2}/lib/midpapi10.jar:${WTK2}/lib/cldcapi10.jar:${PRJ}.jar:. |
0 | 10 |
#CLASSPATH=${WTK2}/lib/midpapi.zip:mojab.jar:./src/:. |
11 |
SRCDIRS=${PRJ} ogdl |
|
12 |
PKGADDONS=icons data |
|
13 |
||
14 |
# TARJETS |
|
15 |
all: |
|
16 |
@cd src && mkdir -p output ${SRCDIRS} ${PKGADDONS} |
|
17 |
@echo "==> Building" |
|
18 |
@cd src && \ |
|
19 |
javac -source 1.2 -target 1.1 -classpath ${CLASSPATH} \ |
|
20 |
-bootclasspath ${CLASSPATH} -encoding UTF-8 \ |
|
21 |
`find ${SRCDIRS} -type f -iname *.java` |
|
22 |
@echo "==> Preverifying" |
|
23 |
@cd src && \ |
|
24 |
${WTK2}/bin/preverify1.1 -classpath ./:${CLASSPATH} \ |
|
25 |
`find ${SRCDIRS} |grep class|awk -F . '{ print $$1; }'` |
|
26 |
||
27 |
clean: |
|
28 |
@echo "==> Cleaning" |
|
29 |
@rm -rf ${PRJ}.jad ${PRJ}.jar `find src/| grep class` src/output javadoc |
|
30 |
||
31 |
doc: |
|
32 |
@echo "==> Generating documentation" |
|
33 |
@cd src && \ |
|
34 |
javadoc -classpath ${CLASSPATH} -d ../javadoc/ \ |
|
35 |
`find ${SRCDIRS} -type f -iname *.java` |
|
36 |
||
37 |
jar: |
|
38 |
@echo "==> Generating JAR file" |
|
39 |
@cd src && cp -rf ${PKGADDONS} output/ |
|
40 |
@cd src/output && \ |
|
41 |
jar cmf ../META-INF/MANIFEST.MF ../${PRJ}.jar `find .| grep class` ${PKGADDONS} |
|
42 |
@mv src/${PRJ}.jar ./ |
|
43 |
@echo "==> Generating manifest for JAD file" |
|
44 |
@echo "MIDlet-1: ${PRJ}, /icons/online.png, ${PRJ}.Main" > ${PRJ}.jad |
|
45 |
@echo "MIDlet-Jar-Size: `ls -l ${PRJ}.jar|awk '{print $$5 }'`" >> ${PRJ}.jad |
|
46 |
@echo "MIDlet-Jar-URL: ${PRJ}.jar" >> ${PRJ}.jad |
|
47 |
@echo "MIDlet-Name: ${PRJ}" >> ${PRJ}.jad |
|
48 |
@echo "MIDlet-Vendor: ${VENDOR}" >> ${PRJ}.jad |
|
49 |
@echo "MIDlet-Version: ${VERSION}" >> ${PRJ}.jad |
|
50 |
||
51 |
run: |
|
52 |
@echo "==> Running emulator" |
|
53 |
@${EMULATOR} -classpath ${CLASSPATH} -Xdescriptor:${PRJ}.jad \ |
|
54 |
-Xdevice:DefaultColorPhone |