|
1 <!-- |
|
2 # |
|
3 # Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 # All rights reserved. |
|
5 # This component and the accompanying materials are made available |
|
6 # under the terms of "Eclipse Public License v1.0" |
|
7 # which accompanies this distribution, and is available |
|
8 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 # |
|
10 # Initial Contributors: |
|
11 # Nokia Corporation - initial contribution. |
|
12 # |
|
13 # Contributors: |
|
14 # |
|
15 # Description: |
|
16 # |
|
17 --> |
|
18 |
|
19 <project name="utilities.s60"> |
|
20 |
|
21 <!--EXPORT START--> |
|
22 |
|
23 <target name="do.export"> |
|
24 <exec executable="python" failonerror="true"> |
|
25 <arg value="${java.src.root}/build/buildutils/createstubfiles.py"/> |
|
26 <arg value="${component.root.dir}"/> |
|
27 <arg value="${javah.classnames}"/> |
|
28 <arg value="${javah.dir}"/> |
|
29 </exec> |
|
30 </target> |
|
31 |
|
32 <!--EXPORT START--> |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 <!--Initialize japt specific properties --> |
|
38 <target name="init.j9.japt.properties"> |
|
39 |
|
40 <!--Set the target Jar file depending whether the build is first phase |
|
41 build or second phase build --> |
|
42 <condition property="target.japt.debug" |
|
43 value="${component.root.dir}/debug_japted2.jar" |
|
44 else="${component.root.dir}/debug_japted.jar"> |
|
45 <isset property="second.phase.compilation" /> |
|
46 </condition> |
|
47 |
|
48 <condition property="target.japt.release" |
|
49 value="${component.root.dir}/release_japted2.jar" |
|
50 else="${component.root.dir}/release_japted.jar"> |
|
51 <isset property="second.phase.compilation" /> |
|
52 </condition> |
|
53 |
|
54 <!--Is the japted jar uptodate? --> |
|
55 <uptodate property="japt.not.uptodate" targetfile="${target.japt.debug}"> |
|
56 <srcfiles dir= "${dst.dir}" includes="**/*.class"/> |
|
57 </uptodate> |
|
58 |
|
59 |
|
60 <!--Adding the Jar file containig all the cdc classes into the |
|
61 bootclasspath of the japt tool if the source files contains cdc |
|
62 Java code.--> |
|
63 <condition property="impl.cdc.jar.classpath" |
|
64 value="${impl.cdc.jar}" |
|
65 else=""> |
|
66 <equals arg1="${bcp}" arg2="${bootclasspath.cdc}"/> |
|
67 </condition> |
|
68 |
|
69 <!--Property for setting the debug info for japt--> |
|
70 <condition property="no.strip.debug.info" |
|
71 value="-noStripDebugInfo" |
|
72 else=""> |
|
73 <equals arg1="${target.cfg}" arg2="debug"/> |
|
74 </condition> |
|
75 |
|
76 <!-- Path for JAPT classpath. Nonexistent files are skipped --> |
|
77 <path id="japt.classpath"> |
|
78 <fileset file="${bcp}"/> |
|
79 <fileset file="${int.bcp}"/> |
|
80 <fileset file="${impl.cldc.jar}"/> |
|
81 <fileset file="${impl.cdc.jar.classpath}"/> |
|
82 </path> |
|
83 |
|
84 </target> |
|
85 |
|
86 <!--Do the finetune.classes (japt in J9) if needed --> |
|
87 <target name="finetune.classes" depends="init.j9.japt.properties" |
|
88 unless="japt.not.uptodate"> |
|
89 |
|
90 <!-- The wildcard parameter to japt is different in Linux and Windows. --> |
|
91 <condition property="japt.wildcard.parameter" |
|
92 value=""*"" |
|
93 else="*"> |
|
94 <os family="windows"/> |
|
95 </condition> |
|
96 |
|
97 <exec executable="${j9.java.home}/bin/japt" failonerror="true"> |
|
98 <env key="JAVA_HOME" value="${j9.java.home}"/> |
|
99 <arg value="-includeClass"/> |
|
100 <arg value="${japt.wildcard.parameter}"/> |
|
101 <arg value="-extension"/> |
|
102 <arg value="-inline"/> |
|
103 <arg value="-inlineAllJSRs"/> |
|
104 <arg value="-icp"/> |
|
105 <arg value="${dst.dir}"/> |
|
106 <arg value="-cp"/> |
|
107 <arg value="${toString:japt.classpath}"/> |
|
108 <arg value="-extension"/> |
|
109 <arg value="-jarOutput"/> |
|
110 <arg value="-output"/> |
|
111 <arg value="${target.japt.debug}"/> |
|
112 <arg value="-noStripDebugInfo"/> |
|
113 </exec> |
|
114 |
|
115 <exec executable="${j9.java.home}/bin/japt" failonerror="true"> |
|
116 <env key="JAVA_HOME" value="${j9.java.home}"/> |
|
117 <arg value="-includeClass"/> |
|
118 <arg value="${japt.wildcard.parameter}"/> |
|
119 <arg value="-extension"/> |
|
120 <arg value="-inline"/> |
|
121 <arg value="-inlineAllJSRs"/> |
|
122 <arg value="-icp"/> |
|
123 <arg value="${dst.dir}"/> |
|
124 <arg value="-cp"/> |
|
125 <arg value="${toString:japt.classpath}"/> |
|
126 <arg value="-extension"/> |
|
127 <arg value="-jarOutput"/> |
|
128 <arg value="-output"/> |
|
129 <arg value="${target.japt.release}"/> |
|
130 </exec> |
|
131 </target> |
|
132 |
|
133 <!--JAPT END--> |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 <!--JAR2JXE START--> |
|
143 |
|
144 <!--Initialize jar2jxe specific properties --> |
|
145 <target name="init.j9.jxe.properties"> |
|
146 |
|
147 <!--In dual phase compilation there exists also |
|
148 japted2.jar which needs to be added. --> |
|
149 <condition property="secondary.jar.to.japt.debug" |
|
150 value="${component.root.dir}/debug_japted2.jar" |
|
151 else=""> |
|
152 <isset property="second.phase.compilation" /> |
|
153 </condition> |
|
154 |
|
155 <condition property="secondary.jar.to.japt.release" |
|
156 value="${component.root.dir}/release_japted2.jar" |
|
157 else=""> |
|
158 <isset property="second.phase.compilation" /> |
|
159 </condition> |
|
160 |
|
161 <!--Property for setting the debug info for japt--> |
|
162 <condition property="jxe.debug.info" |
|
163 value="-g:lines,source,vars" |
|
164 else=""> |
|
165 <equals arg1="${target.cfg}" arg2="debug"/> |
|
166 </condition> |
|
167 |
|
168 <!--Is the jxe_debug.c uptodate? --> |
|
169 <uptodate property="jxe.not.uptodate" |
|
170 targetfile="${component.root.dir}/jxe_debug.c"> |
|
171 <srcfiles dir= "${component.root.dir}" includes="*.jar"/> |
|
172 </uptodate> |
|
173 |
|
174 </target> |
|
175 |
|
176 <!--Do the rommize.classes (jar2jxe in J9)">--> |
|
177 <target name="rommize.classes" depends="init.j9.jxe.properties" |
|
178 unless="jxe.not.uptodate"> |
|
179 |
|
180 <exec executable="${j9.java.home}/bin/jar2jxe" failonerror="true"> |
|
181 <env key="JAVA_HOME" value="${j9.java.home}"/> |
|
182 <arg value="-nog"/> |
|
183 <arg value="-o"/> |
|
184 <arg value="${component.root.dir}/jxe_debug"/> |
|
185 <arg value="-outputFormat"/> |
|
186 <arg value="c"/> |
|
187 <arg value="-g:lines,source,vars"/> |
|
188 <arg value="${component.root.dir}/debug_japted.jar"/> |
|
189 <arg value="${secondary.jar.to.japt.debug}"/> |
|
190 </exec> |
|
191 |
|
192 <exec executable="${j9.java.home}/bin/jar2jxe" failonerror="true"> |
|
193 <env key="JAVA_HOME" value="${j9.java.home}"/> |
|
194 <arg value="-nog"/> |
|
195 <arg value="-o"/> |
|
196 <arg value="${component.root.dir}/jxe_release"/> |
|
197 <arg value="-outputFormat"/> |
|
198 <arg value="c"/> |
|
199 <arg value="${component.root.dir}/release_japted.jar"/> |
|
200 <arg value="${secondary.jar.to.japt.release}"/> |
|
201 </exec> |
|
202 |
|
203 </target> |
|
204 |
|
205 <!--JAR2JXE END--> |
|
206 |
|
207 |
|
208 <!--This target just checks whether there is need to create/update the |
|
209 jxe.c file --> |
|
210 <target name="init.lookup.properties" if="javah.classnames"> |
|
211 <uptodate property="lookup.uptodate" |
|
212 targetfile="${component.root.dir}/lookup.cpp"> |
|
213 <srcfiles dir="${javah.dir}" includes="*.h"> |
|
214 <present present="both" targetdir="${temp.javah.dir}"/> |
|
215 </srcfiles> |
|
216 |
|
217 </uptodate> |
|
218 </target> |
|
219 |
|
220 <!--LOOKUP GENERATION START--> |
|
221 <!--Generate the lookup file in S60 --> |
|
222 <target name="jni.utils" depends="init.lookup.properties" |
|
223 unless="lookup.uptodate"> |
|
224 <exec executable="python" failonerror="true"> |
|
225 <arg value="${java.src.root}/build/buildutils/generates60lookup.py"/> |
|
226 <arg value="${temp.javah.dir}"/> |
|
227 <arg value="${component.root.dir}/lookup.cpp"/> |
|
228 </exec> |
|
229 </target> |
|
230 <!--LOOKUP GENERATION END--> |
|
231 |
|
232 </project> |
|
233 |