source: trunk/openjdk/jdk/make/common/shared/Defs-solaris.gmk

Last change on this file was 278, checked in by dmik, 14 years ago

trunk: Merged in openjdk6 b22 from branches/vendor/oracle.

File size: 8.0 KB
Line 
1#
2# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation. Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25
26#
27# Definitions for Solaris.
28#
29
30# MOTIF_REQUIRED setting must be true or false
31ifdef MOTIF_REQUIRED
32 ifneq ($(MOTIF_REQUIRED), false)
33 ifneq ($(MOTIF_REQUIRED), true)
34 error:=$(error "ERROR: MOTIF_REQUIRED must be true or false")
35 endif
36 endif
37else
38 # Default setting (Motif libraries not used with OpenJDK)
39 ifdef OPENJDK
40 MOTIF_REQUIRED=false
41 else
42 MOTIF_REQUIRED=true
43 endif
44endif
45
46# Default for COMPILER_WARNINGS_FATAL on Solaris (C & C++ compiler warnings)
47ifndef COMPILER_WARNINGS_FATAL
48 COMPILER_WARNINGS_FATAL=false
49endif
50
51# Solaris should use parallel compilation for best build times
52ifndef COMPILE_APPROACH
53 COMPILE_APPROACH = parallel
54endif
55
56# Indication that we are doing an incremental build.
57# This may trigger the creation of make depend files.
58ifndef INCREMENTAL_BUILD
59 INCREMENTAL_BUILD = false
60endif
61
62# FullPath just makes sure it never ends with a / and no duplicates
63define FullPath
64$(shell cd $1 2> $(DEV_NULL) && pwd)
65endef
66
67# OptFullPath: Absolute path name of a dir that might not initially exist.
68define OptFullPath
69$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
70endef
71
72# Location on system where jdk installs might be
73USRJDKINSTANCES_PATH =/usr/jdk/instances
74
75# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
76# NOTE: Must end with / so that it could be empty, allowing PATH usage.
77ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
78 UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
79else
80 UNIXCOMMAND_PATH = /usr/bin/
81endif
82
83# UNIXCCS_PATH: path to where the less common UNIX commands can be found
84# NOTE: Must end with / so that it could be empty, allowing PATH usage.
85ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
86 UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
87else
88 UNIXCCS_PATH = /usr/ccs/bin/
89endif
90
91# SLASH_JAVA: location of all network accessable files
92ifdef ALT_SLASH_JAVA
93 SLASH_JAVA :=$(ALT_SLASH_JAVA)
94else
95 SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
96endif
97
98# JDK_DEVTOOLS_DIR: common path for all the java devtools
99ifdef ALT_JDK_DEVTOOLS_DIR
100 JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
101else
102 JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
103endif
104
105# COMPILER_PATH: path to where the compiler and tools are installed.
106# NOTE: Must end with / so that it could be empty, allowing PATH usage.
107ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
108 COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
109else
110 # Careful here, COMPILER_VERSION may not be defined yet (see Compiler.gmk)
111 # If the place where we keep a set of Sun Studio compilers doesn't exist,
112 # try and use /opt/SUNWspro, the default location for the SS compilers.
113 # (DirExists checks for this path twice, an automount double check)
114 _SUNSTUDIO_SET_ROOT=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/SUNWspro
115 SUNSTUDIO_SET_ROOT:=$(call DirExists,$(_SUNSTUDIO_SET_ROOT),$(_SUNSTUDIO_SET_ROOT),)
116 ifneq ($(SUNSTUDIO_SET_ROOT),)
117 COMPILER_PATH =$(SUNSTUDIO_SET_ROOT)/$(COMPILER_VERSION)/bin/
118 else
119 COMPILER_PATH =/opt/SUNWspro/bin/
120 endif
121endif
122
123# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
124# NOTE: Must end with / so that it could be empty, allowing PATH usage.
125ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
126 DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
127else
128 ifdef ALT_JDK_DEVTOOLS_DIR
129 DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
130 else
131 ifdef OPENJDK
132 DEVTOOLS_PATH = /usr/bin/
133 else
134 DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
135 endif
136 endif
137endif
138
139# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
140# _BOOTDIR2: Second choice
141ifndef ALT_BOOTDIR
142 _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
143 _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
144endif
145
146# GCC_COMPILER_PATH: path to where the gcc/g++ compiler and tools are installed
147# NOTE: Must end with / so that it could be empty, allowing PATH usage.
148ifneq "$(origin ALT_GCC_COMPILER_PATH)" "undefined"
149 GCC_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC_COMPILER_PATH))
150else
151 GCC_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/gnucc/bin/
152endif
153
154# MOTIF_DIR: must point to a directory containing motif12 and
155# and motif21 directories which in turn contain the Xm and include
156# directories for the appropriate version of motif.
157# If MOTIF21, and OPENJDK, the motif12 and motif21 may be skipped.
158ifdef ALT_MOTIF_DIR
159 MOTIF_DIR=$(ALT_MOTIF_DIR)/motif21
160 MOTIF_LIB = $(MOTIF_DIR)/lib
161 MOTIF_INCLUDE = $(MOTIF_DIR)/include
162else
163 ifdef ALT_JDK_DEVTOOLS_DIR
164 MOTIF_DIR = $(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/motif21
165 MOTIF_LIB = $(MOTIF_DIR)/lib
166 MOTIF_INCLUDE = $(MOTIF_DIR)/include
167 else
168 ifdef OPENJDK
169 MOTIF_DIR = /usr
170 MOTIF_LIB = $(MOTIF_DIR)/lib$(ISA_DIR)
171 MOTIF_INCLUDE = $(MOTIF_DIR)/include
172 else
173 MOTIF_DIR = $(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/motif21
174 MOTIF_LIB = $(MOTIF_DIR)/lib
175 MOTIF_INCLUDE = $(MOTIF_DIR)/include
176 endif
177 endif
178endif
179ifeq ($(MOTIF_REQUIRED), true)
180 BUILD_MOTIF21 = true
181endif
182
183# Always build headless on Solaris
184BUILD_HEADLESS = true
185
186_CUPS_HEADERS_PATH=/opt/sfw/cups/include
187
188# Import JDK images allow for partial builds, components not built are
189# imported (or copied from) these import areas when needed.
190
191# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
192# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
193ifdef ALT_BUILD_JDK_IMPORT_PATH
194 BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
195else
196 BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
197endif
198BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
199
200# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
201ifdef ALT_JDK_IMPORT_PATH
202 JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
203else
204 JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
205endif
206JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
207
208# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
209ifdef ALT_HOTSPOT_IMPORT_PATH
210 HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
211else
212 HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
213endif
214HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
215
216# HOTSPOT_CLIENT_PATH: location of client jvm library file.
217ifeq ($(ARCH_DATA_MODEL), 32)
218 ifdef ALT_HOTSPOT_CLIENT_PATH
219 HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
220 else
221 HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
222 endif
223 HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
224endif
225
226# HOTSPOT_SERVER_PATH: location of server jvm library file.
227ifdef ALT_HOTSPOT_SERVER_PATH
228 HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
229else
230 HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
231endif
232HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
233
Note: See TracBrowser for help on using the repository browser.