Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / security / coreconf / jdk.mk
blob98bc188aed628733fb750d9de94e42c06e59922b
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
13 # License.
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.
22 # Contributor(s):
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 *****
38 ifdef NS_USE_JDK
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 =
48 endif
50 #######################################################################
51 # [2] Define platform-independent JDK "Core Components" options #
52 #######################################################################
54 # set default location of the java classes repository
55 ifeq ($(JAVA_DESTPATH),)
56 ifdef BUILD_OPT
57 JAVA_DESTPATH = $(SOURCE_CLASSES_DIR)
58 else
59 JAVA_DESTPATH = $(SOURCE_CLASSES_DBG_DIR)
60 endif
61 endif
63 # set default location of the package under the java classes repository
64 # note that this overrides the default package value in ruleset.mk
65 ifeq ($(PACKAGE),)
66 PACKAGE = .
67 endif
69 # set default location of the java source code repository
70 ifeq ($(JAVA_SOURCEPATH),)
71 JAVA_SOURCEPATH = .
72 endif
74 # add JNI directory to default include search path
75 ifneq ($(JNI_GEN),)
76 ifdef NSBUILDROOT
77 INCLUDES += -I$(JNI_GEN_DIR) -I$(SOURCE_XP_DIR)
78 else
79 INCLUDES += -I$(JNI_GEN_DIR)
80 endif
81 endif
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
91 ifeq ($(JRE_HOME),)
92 JRE_HOME = $(JAVA_HOME)
93 JRE_CLASSES = $(JAVA_CLASSES)
94 else
95 ifeq ($(JRE_CLASSES),)
96 JRE_CLASSES = $(JRE_HOME)/lib/rt.jar
97 endif
98 endif
100 PATH_SEPARATOR = ;
102 # (2) specify "header" information
103 JAVA_ARCH = win32
105 INCLUDES += -I$(JAVA_HOME)/include
106 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
108 # currently, disable JIT option on this platform
109 JDK_JIT_OPT = -nojit
110 endif
112 # set [Sun Solaris] platforms
113 ifeq ($(OS_ARCH), SunOS)
114 JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar
116 ifeq ($(JRE_HOME),)
117 JRE_HOME = $(JAVA_HOME)
118 JRE_CLASSES = $(JAVA_CLASSES)
119 else
120 ifeq ($(JRE_CLASSES),)
121 JRE_CLASSES = $(JRE_HOME)/lib/rt.jar
122 endif
123 endif
125 PATH_SEPARATOR = :
127 # (2) specify "header" information
128 JAVA_ARCH = solaris
130 INCLUDES += -I$(JAVA_HOME)/include
131 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
133 # currently, disable JIT option on this platform
134 JDK_JIT_OPT =
135 endif
137 # set [Hewlett Packard HP-UX] platforms
138 ifeq ($(OS_ARCH), HP-UX)
139 JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar
141 ifeq ($(JRE_HOME),)
142 JRE_HOME = $(JAVA_HOME)
143 JRE_CLASSES = $(JAVA_CLASSES)
144 else
145 ifeq ($(JRE_CLASSES),)
146 JRE_CLASSES = $(JRE_HOME)/lib/rt.jar
147 endif
148 endif
150 PATH_SEPARATOR = :
152 # (2) specify "header" information
153 JAVA_ARCH = hp-ux
155 INCLUDES += -I$(JAVA_HOME)/include
156 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
158 # no JIT option available on this platform
159 JDK_JIT_OPT =
160 endif
162 # set [Redhat Linux] platforms
163 ifeq ($(OS_ARCH), Linux)
164 JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar
166 ifeq ($(JRE_HOME),)
167 JRE_HOME = $(JAVA_HOME)
168 JRE_CLASSES = $(JAVA_CLASSES)
169 else
170 ifeq ($(JRE_CLASSES),)
171 JRE_CLASSES = $(JRE_HOME)/lib/rt.jar
172 endif
173 endif
175 PATH_SEPARATOR = :
177 # (2) specify "header" information
178 JAVA_ARCH = linux
180 INCLUDES += -I$(JAVA_HOME)/include
181 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
183 # no JIT option available on this platform
184 JDK_JIT_OPT =
185 endif
187 # set [Mac OS X] platforms
188 ifeq ($(OS_ARCH), Darwin)
189 JAVA_CLASSES = $(JAVA_HOME)/../Classes/classes.jar
191 ifeq ($(JRE_HOME),)
192 JRE_HOME = $(JAVA_HOME)
193 JRE_CLASSES = $(JAVA_CLASSES)
194 else
195 ifeq ($(JRE_CLASSES),)
196 JRE_CLASSES = $(JRE_HOME)/../Classes/classes.jar
197 endif
198 endif
200 PATH_SEPARATOR = :
202 # (2) specify "header" information
203 JAVA_ARCH = darwin
205 INCLUDES += -I$(JAVA_HOME)/include
206 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
208 # no JIT option available on this platform
209 JDK_JIT_OPT =
210 endif
212 # set [IBM AIX] platforms
213 ifeq ($(OS_ARCH), AIX)
214 JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar
216 ifeq ($(JRE_HOME),)
217 JRE_HOME = $(JAVA_HOME)
218 JRE_CLASSES = $(JAVA_CLASSES)
219 else
220 ifeq ($(JRE_CLASSES),)
221 JRE_CLASSES = $(JRE_HOME)/lib/rt.jar
222 endif
223 endif
225 PATH_SEPARATOR = :
227 # (2) specify "header" information
228 JAVA_ARCH = aix
230 INCLUDES += -I$(JAVA_HOME)/include
231 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
233 # no JIT option available on this platform
234 JDK_JIT_OPT =
235 endif
237 # set [Digital UNIX] platforms
238 ifeq ($(OS_ARCH), OSF1)
239 JAVA_CLASSES = $(JAVA_HOME)/jre/lib/rt.jar
241 ifeq ($(JRE_HOME),)
242 JRE_HOME = $(JAVA_HOME)
243 JRE_CLASSES = $(JAVA_CLASSES)
244 else
245 ifeq ($(JRE_CLASSES),)
246 JRE_CLASSES = $(JRE_HOME)/lib/rt.jar
247 endif
248 endif
250 PATH_SEPARATOR = :
252 # (2) specify "header" information
253 JAVA_ARCH = alpha
255 INCLUDES += -I$(JAVA_HOME)/include
256 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
258 # no JIT option available on this platform
259 JDK_JIT_OPT =
260 endif
262 # set [Silicon Graphics IRIX] platforms
263 ifeq ($(OS_ARCH), IRIX)
264 JAVA_CLASSES = $(JAVA_HOME)/lib/dev.jar:$(JAVA_HOME)/lib/rt.jar
266 ifeq ($(JRE_HOME),)
267 JRE_HOME = $(JAVA_HOME)
268 JRE_CLASSES = $(JAVA_CLASSES)
269 else
270 ifeq ($(JRE_CLASSES),)
271 JRE_CLASSES = $(JRE_HOME)/lib/dev.jar:$(JRE_HOME)/lib/rt.jar
272 endif
273 endif
275 PATH_SEPARATOR = :
277 # (2) specify "header" information
278 JAVA_ARCH = irix
280 INCLUDES += -I$(JAVA_HOME)/include
281 INCLUDES += -I$(JAVA_HOME)/include/$(JAVA_ARCH)
283 # no JIT option available on this platform
284 JDK_JIT_OPT =
285 endif
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
294 else
295 JDK_OPTIMIZER_OPT = -g
296 endif
298 # set minimal JDK debugging model
299 ifeq ($(JDK_DEBUG),1)
300 JDK_DEBUG_OPT = -debug
301 else
302 JDK_DEBUG_OPT =
303 endif
305 # set default path to repository for JDK classes
306 ifeq ($(JDK_CLASS_REPOSITORY_OPT),)
307 JDK_CLASS_REPOSITORY_OPT = -d $(JAVA_DESTPATH)
308 endif
310 # define a default JDK classpath
311 ifeq ($(JDK_CLASSPATH),)
312 JDK_CLASSPATH = '$(JAVA_DESTPATH)$(PATH_SEPARATOR)$(JAVA_SOURCEPATH)$(PATH_SEPARATOR)$(JAVA_CLASSES)'
313 endif
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)
318 endif
320 ifeq ($(USE_64), 1)
321 JDK_USE_64 = -d64
322 endif
324 endif
327 #######################################################################
328 # [5] Define JDK "Core Components" toolset; #
329 # (always allow a user to override these values) #
330 #######################################################################
333 # (1) appletviewer
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)
342 endif
345 # (2) jar
348 ifeq ($(JAR),)
349 JAR_PROG = $(JAVA_HOME)/bin/jar$(PROG_SUFFIX)
350 JAR_FLAGS = $(JDK_THREADING_MODEL_OPT)
351 JAR = $(JAR_PROG) $(JAR_FLAGS)
352 endif
355 # (3) java
358 ifeq ($(JAVA),)
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)
366 endif
369 # (4) javac
372 ifeq ($(JAVAC),)
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)
381 endif
384 # (5) javadoc
387 ifeq ($(JAVADOC),)
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)
392 endif
395 # (6) javah
398 ifeq ($(JAVAH),)
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)
403 endif
406 # (7) javakey
409 ifeq ($(JAVAKEY),)
410 JAVAKEY_PROG = $(JAVA_HOME)/bin/javakey$(PROG_SUFFIX)
411 JAVAKEY_FLAGS = $(JDK_THREADING_MODEL_OPT)
412 JAVAKEY = $(JAVAKEY_PROG) $(JAVAKEY_FLAGS)
413 endif
416 # (8) javap
419 ifeq ($(JAVAP),)
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)
424 endif
427 # (9) javat
430 ifeq ($(JAVAT),)
431 JAVAT_PROG = $(JAVA_HOME)/bin/javat$(PROG_SUFFIX)
432 JAVAT_FLAGS = $(JDK_THREADING_MODEL_OPT)
433 JAVAT = $(JAVAT_PROG) $(JAVAT_FLAGS)
434 endif
437 # (10) javaverify
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)
444 endif
447 # (11) javaw
450 ifeq ($(JAVAW),)
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)
457 endif
460 # (12) jdb
463 ifeq ($(JDB),)
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)
470 endif
473 # (13) jre
476 ifeq ($(JRE),)
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)
482 endif
485 # (14) jrew
488 ifeq ($(JREW),)
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)
494 endif
497 # (15) native2ascii
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)
504 endif
507 # (16) rmic
510 ifeq ($(RMIC),)
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)
516 endif
519 # (17) rmiregistry
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)
526 endif
529 # (18) serialver
532 ifeq ($(SERIALVER),)
533 SERIALVER_PROG = $(JAVA_HOME)/bin/serialver$(PROG_SUFFIX)
534 SERIALVER_FLAGS = $(JDK_THREADING_MODEL_OPT)
535 SERIALVER = $(SERIALVER_PROG) $(SERIALVER_FLAGS)
536 endif