1
|
1 |
# PRJ
|
|
2 |
PRJ=jdict
|
|
3 |
VENDOR=viric
|
|
4 |
VERSION=0.1
|
|
5 |
|
|
6 |
# RTE
|
|
7 |
WTK2?=/opt/wtk2.2
|
|
8 |
EMULATOR=${WTK2}/bin/emulator
|
|
9 |
CLASSPATH=${WTK2}/lib/midpapi10.jar:${WTK2}/lib/cldcapi10.jar:${PRJ}.jar:.
|
|
10 |
#CLASSPATH=${WTK2}/lib/midpapi.zip:mojab.jar:./src/:.
|
|
11 |
SRCDIRS=${PRJ}
|
12
|
12 |
PKGADDONS=dicts
|
1
|
13 |
|
28
|
14 |
# TARGETS
|
1
|
15 |
all:
|
|
16 |
@cd src && mkdir -p output ${SRCDIRS} ${PKGADDONS}
|
|
17 |
@echo "==> Building"
|
|
18 |
@cd src && \
|
|
19 |
javac -g -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 |
imatges:
|
|
38 |
./makepngs
|
|
39 |
rm src/imatges/*
|
|
40 |
cp png/* src/imatges
|
|
41 |
|
|
42 |
jar:
|
|
43 |
@echo "==> Generating JAR file"
|
|
44 |
@cd src && cp -rf ${PKGADDONS} output/
|
|
45 |
@cd src/output && \
|
|
46 |
jar cmf ../META-INF/MANIFEST.MF ../${PRJ}.jar `find .| grep class` ${PKGADDONS}
|
|
47 |
@mv src/${PRJ}.jar ./
|
|
48 |
@echo "==> Generating manifest for JAD file"
|
|
49 |
@echo "MIDlet-1: ${PRJ}, /icons/online.png, ${PRJ}.Main" > ${PRJ}.jad
|
|
50 |
@echo "MIDlet-Jar-Size: `ls -l ${PRJ}.jar|awk '{print $$5 }'`" >> ${PRJ}.jad
|
|
51 |
@echo "MIDlet-Jar-URL: ${PRJ}.jar" >> ${PRJ}.jad
|
|
52 |
@echo "MIDlet-Name: ${PRJ}" >> ${PRJ}.jad
|
|
53 |
@echo "MIDlet-Vendor: ${VENDOR}" >> ${PRJ}.jad
|
|
54 |
@echo "MIDlet-Version: ${VERSION}" >> ${PRJ}.jad
|
|
55 |
|
|
56 |
run:
|
|
57 |
@echo "==> Running emulator"
|
|
58 |
@${EMULATOR} -classpath ${CLASSPATH} -Xdescriptor:${PRJ}.jad \
|
|
59 |
-Xdevice:DefaultColorPhone
|
2
|
60 |
|
|
61 |
debug:
|
|
62 |
@echo "==> Running emulator"
|
|
63 |
@${EMULATOR} -classpath ${CLASSPATH} -Xdescriptor:${PRJ}.jad \
|
|
64 |
-Xdevice:DefaultColorPhone -Xdebug -Xrunjdwp:transport=dt_socket,address=3000,server=y,suspend=n
|