2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
15 # The Original Code is the Netscape security libraries.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1994-2000
20 # the Initial Developer. All Rights Reserved.
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
39 #######################################################################
40 # [1] Define preliminary JDK "Core Components" toolset options #
41 #######################################################################
43 # set default JDK java threading model
44 ifeq ($(JDK_THREADING_MODEL
),)
45 JDK_THREADING_MODEL
= native_threads
46 # no such thing as -native flag
47 JDK_THREADING_MODEL_OPT
=
50 #######################################################################
51 # [2] Define platform-independent JDK "Core Components" options #
52 #######################################################################
54 # set default location of the java classes repository
55 ifeq ($(JAVA_DESTPATH
),)
57 JAVA_DESTPATH
= $(SOURCE_CLASSES_DIR
)
59 JAVA_DESTPATH
= $(SOURCE_CLASSES_DBG_DIR
)
63 # set default location of the package under the java classes repository
64 # note that this overrides the default package value in ruleset.mk
69 # set default location of the java source code repository
70 ifeq ($(JAVA_SOURCEPATH
),)
74 # add JNI directory to default include search path
77 INCLUDES
+= -I
$(JNI_GEN_DIR
) -I
$(SOURCE_XP_DIR
)
79 INCLUDES
+= -I
$(JNI_GEN_DIR
)
83 #######################################################################
84 # [3] Define platform-dependent JDK "Core Components" options #
85 #######################################################################
87 # set [Microsoft Windows] platforms
88 ifeq ($(OS_ARCH
), WINNT
)
89 JAVA_CLASSES
= $(JAVA_HOME
)/jre
/lib
/rt.jar
92 JRE_HOME
= $(JAVA_HOME
)
93 JRE_CLASSES
= $(JAVA_CLASSES
)
95 ifeq ($(JRE_CLASSES
),)
96 JRE_CLASSES
= $(JRE_HOME
)/lib
/rt.jar
102 # (2) specify "header" information
105 INCLUDES
+= -I
$(JAVA_HOME
)/include
106 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
108 # currently, disable JIT option on this platform
112 # set [Sun Solaris] platforms
113 ifeq ($(OS_ARCH
), SunOS
)
114 JAVA_CLASSES
= $(JAVA_HOME
)/jre
/lib
/rt.jar
117 JRE_HOME
= $(JAVA_HOME
)
118 JRE_CLASSES
= $(JAVA_CLASSES
)
120 ifeq ($(JRE_CLASSES
),)
121 JRE_CLASSES
= $(JRE_HOME
)/lib
/rt.jar
127 # (2) specify "header" information
130 INCLUDES
+= -I
$(JAVA_HOME
)/include
131 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
133 # currently, disable JIT option on this platform
137 # set [Hewlett Packard HP-UX] platforms
138 ifeq ($(OS_ARCH
), HP-UX
)
139 JAVA_CLASSES
= $(JAVA_HOME
)/jre
/lib
/rt.jar
142 JRE_HOME
= $(JAVA_HOME
)
143 JRE_CLASSES
= $(JAVA_CLASSES
)
145 ifeq ($(JRE_CLASSES
),)
146 JRE_CLASSES
= $(JRE_HOME
)/lib
/rt.jar
152 # (2) specify "header" information
155 INCLUDES
+= -I
$(JAVA_HOME
)/include
156 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
158 # no JIT option available on this platform
162 # set [Redhat Linux] platforms
163 ifeq ($(OS_ARCH
), Linux
)
164 JAVA_CLASSES
= $(JAVA_HOME
)/jre
/lib
/rt.jar
167 JRE_HOME
= $(JAVA_HOME
)
168 JRE_CLASSES
= $(JAVA_CLASSES
)
170 ifeq ($(JRE_CLASSES
),)
171 JRE_CLASSES
= $(JRE_HOME
)/lib
/rt.jar
177 # (2) specify "header" information
180 INCLUDES
+= -I
$(JAVA_HOME
)/include
181 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
183 # no JIT option available on this platform
187 # set [Mac OS X] platforms
188 ifeq ($(OS_ARCH
), Darwin
)
189 JAVA_CLASSES
= $(JAVA_HOME
)/..
/Classes
/classes.jar
192 JRE_HOME
= $(JAVA_HOME
)
193 JRE_CLASSES
= $(JAVA_CLASSES
)
195 ifeq ($(JRE_CLASSES
),)
196 JRE_CLASSES
= $(JRE_HOME
)/..
/Classes
/classes.jar
202 # (2) specify "header" information
205 INCLUDES
+= -I
$(JAVA_HOME
)/include
206 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
208 # no JIT option available on this platform
212 # set [IBM AIX] platforms
213 ifeq ($(OS_ARCH
), AIX
)
214 JAVA_CLASSES
= $(JAVA_HOME
)/jre
/lib
/rt.jar
217 JRE_HOME
= $(JAVA_HOME
)
218 JRE_CLASSES
= $(JAVA_CLASSES
)
220 ifeq ($(JRE_CLASSES
),)
221 JRE_CLASSES
= $(JRE_HOME
)/lib
/rt.jar
227 # (2) specify "header" information
230 INCLUDES
+= -I
$(JAVA_HOME
)/include
231 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
233 # no JIT option available on this platform
237 # set [Digital UNIX] platforms
238 ifeq ($(OS_ARCH
), OSF1
)
239 JAVA_CLASSES
= $(JAVA_HOME
)/jre
/lib
/rt.jar
242 JRE_HOME
= $(JAVA_HOME
)
243 JRE_CLASSES
= $(JAVA_CLASSES
)
245 ifeq ($(JRE_CLASSES
),)
246 JRE_CLASSES
= $(JRE_HOME
)/lib
/rt.jar
252 # (2) specify "header" information
255 INCLUDES
+= -I
$(JAVA_HOME
)/include
256 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
258 # no JIT option available on this platform
262 # set [Silicon Graphics IRIX] platforms
263 ifeq ($(OS_ARCH
), IRIX
)
264 JAVA_CLASSES
= $(JAVA_HOME
)/lib
/dev.jar
:$(JAVA_HOME
)/lib
/rt.jar
267 JRE_HOME
= $(JAVA_HOME
)
268 JRE_CLASSES
= $(JAVA_CLASSES
)
270 ifeq ($(JRE_CLASSES
),)
271 JRE_CLASSES
= $(JRE_HOME
)/lib
/dev.jar
:$(JRE_HOME
)/lib
/rt.jar
277 # (2) specify "header" information
280 INCLUDES
+= -I
$(JAVA_HOME
)/include
281 INCLUDES
+= -I
$(JAVA_HOME
)/include/$(JAVA_ARCH
)
283 # no JIT option available on this platform
287 #######################################################################
288 # [4] Define remaining JDK "Core Components" default toolset options #
289 #######################################################################
291 # set JDK optimization model
292 ifeq ($(BUILD_OPT
),1)
293 JDK_OPTIMIZER_OPT
= -O
295 JDK_OPTIMIZER_OPT
= -g
298 # set minimal JDK debugging model
299 ifeq ($(JDK_DEBUG
),1)
300 JDK_DEBUG_OPT
= -debug
305 # set default path to repository for JDK classes
306 ifeq ($(JDK_CLASS_REPOSITORY_OPT
),)
307 JDK_CLASS_REPOSITORY_OPT
= -d
$(JAVA_DESTPATH
)
310 # define a default JDK classpath
311 ifeq ($(JDK_CLASSPATH
),)
312 JDK_CLASSPATH
= '$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)$(PATH_SEPARATOR)$(JAVA_CLASSES)'
315 # by default, override CLASSPATH environment variable using the JDK classpath option with $(JDK_CLASSPATH)
316 ifeq ($(JDK_CLASSPATH_OPT
),)
317 JDK_CLASSPATH_OPT
= -classpath
$(JDK_CLASSPATH
)
327 #######################################################################
328 # [5] Define JDK "Core Components" toolset; #
329 # (always allow a user to override these values) #
330 #######################################################################
336 ifeq ($(APPLETVIEWER
),)
337 APPLETVIEWER_PROG
= $(JAVA_HOME
)/bin
/appletviewer
$(PROG_SUFFIX
)
338 APPLETVIEWER_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
339 APPLETVIEWER_FLAGS
+= $(JDK_DEBUG_OPT
)
340 APPLETVIEWER_FLAGS
+= $(JDK_JIT_OPT
)
341 APPLETVIEWER
= $(APPLETVIEWER_PROG
) $(APPLETVIEWER_FLAGS
)
349 JAR_PROG
= $(JAVA_HOME
)/bin
/jar
$(PROG_SUFFIX
)
350 JAR_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
351 JAR
= $(JAR_PROG
) $(JAR_FLAGS
)
359 JAVA_PROG
= $(JAVA_HOME
)/bin
/java
$(PROG_SUFFIX
)
360 JAVA_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
361 JAVA_FLAGS
+= $(JDK_DEBUG_OPT
)
362 JAVA_FLAGS
+= $(JDK_CLASSPATH_OPT
)
363 JAVA_FLAGS
+= $(JDK_JIT_OPT
)
364 JAVA_FLAGS
+= $(JDK_USE_64
)
365 JAVA
= $(JAVA_PROG
) $(JAVA_FLAGS
)
373 JAVAC_PROG
= $(JAVA_HOME
)/bin
/javac
$(PROG_SUFFIX
)
374 JAVAC_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
375 JAVAC_FLAGS
+= $(JDK_OPTIMIZER_OPT
)
376 JAVAC_FLAGS
+= $(JDK_DEBUG_OPT
)
377 JAVAC_FLAGS
+= $(JDK_CLASSPATH_OPT
)
378 JAVAC_FLAGS
+= $(JDK_CLASS_REPOSITORY_OPT
)
379 JAVAC_FLAGS
+= $(JDK_USE_64
)
380 JAVAC
= $(JAVAC_PROG
) $(JAVAC_FLAGS
)
388 JAVADOC_PROG
= $(JAVA_HOME
)/bin
/javadoc
$(PROG_SUFFIX
)
389 JAVADOC_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
390 JAVADOC_FLAGS
+= $(JDK_CLASSPATH_OPT
)
391 JAVADOC
= $(JAVADOC_PROG
) $(JAVADOC_FLAGS
)
399 JAVAH_PROG
= $(JAVA_HOME
)/bin
/javah
$(PROG_SUFFIX
)
400 JAVAH_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
401 JAVAH_FLAGS
+= $(JDK_CLASSPATH_OPT
)
402 JAVAH
= $(JAVAH_PROG
) $(JAVAH_FLAGS
)
410 JAVAKEY_PROG
= $(JAVA_HOME
)/bin
/javakey
$(PROG_SUFFIX
)
411 JAVAKEY_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
412 JAVAKEY
= $(JAVAKEY_PROG
) $(JAVAKEY_FLAGS
)
420 JAVAP_PROG
= $(JAVA_HOME
)/bin
/javap
$(PROG_SUFFIX
)
421 JAVAP_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
422 JAVAP_FLAGS
+= $(JDK_CLASSPATH_OPT
)
423 JAVAP
= $(JAVAP_PROG
) $(JAVAP_FLAGS
)
431 JAVAT_PROG
= $(JAVA_HOME
)/bin
/javat
$(PROG_SUFFIX
)
432 JAVAT_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
433 JAVAT
= $(JAVAT_PROG
) $(JAVAT_FLAGS
)
440 ifeq ($(JAVAVERIFY
),)
441 JAVAVERIFY_PROG
= $(JAVA_HOME
)/bin
/javaverify
$(PROG_SUFFIX
)
442 JAVAVERIFY_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
443 JAVAVERIFY
= $(JAVAVERIFY_PROG
) $(JAVAVERIFY_FLAGS
)
451 jJAVAW_PROG
= $(JAVA_HOME
)/bin
/javaw
$(PROG_SUFFIX
)
452 jJAVAW_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
453 jJAVAW_FLAGS
+= $(JDK_DEBUG_OPT
)
454 jJAVAW_FLAGS
+= $(JDK_CLASSPATH_OPT
)
455 jJAVAW_FLAGS
+= $(JDK_JIT_OPT
)
456 jJAVAW
= $(JAVAW_PROG
) $(JAVAW_FLAGS
)
464 JDB_PROG
= $(JAVA_HOME
)/bin
/jdb
$(PROG_SUFFIX
)
465 JDB_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
466 JDB_FLAGS
+= $(JDK_DEBUG_OPT
)
467 JDB_FLAGS
+= $(JDK_CLASSPATH_OPT
)
468 JDB_FLAGS
+= $(JDK_JIT_OPT
)
469 JDB
= $(JDB_PROG
) $(JDB_FLAGS
)
477 JRE_PROG
= $(JAVA_HOME
)/bin
/jre
$(PROG_SUFFIX
)
478 JRE_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
479 JRE_FLAGS
+= $(JDK_CLASSPATH_OPT
)
480 JRE_FLAGS
+= $(JDK_JIT_OPT
)
481 JRE
= $(JRE_PROG
) $(JRE_FLAGS
)
489 JREW_PROG
= $(JAVA_HOME
)/bin
/jrew
$(PROG_SUFFIX
)
490 JREW_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
491 JREW_FLAGS
+= $(JDK_CLASSPATH_OPT
)
492 JREW_FLAGS
+= $(JDK_JIT_OPT
)
493 JREW
= $(JREW_PROG
) $(JREW_FLAGS
)
500 ifeq ($(NATIVE2ASCII
),)
501 NATIVE2ASCII_PROG
= $(JAVA_HOME
)/bin
/native2ascii
$(PROG_SUFFIX
)
502 NATIVE2ASCII_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
503 NATIVE2ASCII
= $(NATIVE2ASCII_PROG
) $(NATIVE2ASCII_FLAGS
)
511 RMIC_PROG
= $(JAVA_HOME
)/bin
/rmic
$(PROG_SUFFIX
)
512 RMIC_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
513 RMIC_FLAGS
+= $(JDK_OPTIMIZER_OPT
)
514 RMIC_FLAGS
+= $(JDK_CLASSPATH_OPT
)
515 RMIC
= $(RMIC_PROG
) $(RMIC_FLAGS
)
522 ifeq ($(RMIREGISTRY
),)
523 RMIREGISTRY_PROG
= $(JAVA_HOME
)/bin
/rmiregistry
$(PROG_SUFFIX
)
524 RMIREGISTRY_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
525 RMIREGISTRY
= $(RMIREGISTRY_PROG
) $(RMIREGISTRY_FLAGS
)
533 SERIALVER_PROG
= $(JAVA_HOME
)/bin
/serialver
$(PROG_SUFFIX
)
534 SERIALVER_FLAGS
= $(JDK_THREADING_MODEL_OPT
)
535 SERIALVER
= $(SERIALVER_PROG
) $(SERIALVER_FLAGS
)