blob: b3630bac34bb074f319b66b062f833d2c685013c [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001#
2# Copyright 2005-2007 Sun Microsystems, Inc. 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. Sun designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22# CA 95054 USA or visit www.sun.com if you need additional information or
23# have any questions.
24#
25
26#
27# Definitions for Solaris.
28#
29
30# Default for COMPILER_WARNINGS_FATAL on Solaris (C & C++ compiler warnings)
31ifndef COMPILER_WARNINGS_FATAL
32 COMPILER_WARNINGS_FATAL=false
33endif
34
35# Solaris should use parallel compilation for best build times
36ifndef COMPILE_APPROACH
37 COMPILE_APPROACH = parallel
38endif
39
40# Indication that we are doing an incremental build.
41# This may trigger the creation of make depend files.
42ifndef INCREMENTAL_BUILD
43 INCREMENTAL_BUILD = false
44endif
45
46# FullPath just makes sure it never ends with a / and no duplicates
47define FullPath
48$(shell cd $1 2> $(DEV_NULL) && pwd)
49endef
50
51# OptFullPath: Absolute path name of a dir that might not initially exist.
52define OptFullPath
53$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
54endef
55
56# Location on system where jdk installs might be
57USRJDKINSTANCES_PATH =/usr/jdk/instances
58
59# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
60# NOTE: Must end with / so that it could be empty, allowing PATH usage.
61ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
62 UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
63else
64 UNIXCOMMAND_PATH = /usr/bin/
65endif
66
67# UNIXCCS_PATH: path to where the less common UNIX commands can be found
68# NOTE: Must end with / so that it could be empty, allowing PATH usage.
69ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
70 UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
71else
72 UNIXCCS_PATH = /usr/ccs/bin/
73endif
74
75# SLASH_JAVA: location of all network accessable files
76ifdef ALT_SLASH_JAVA
77 SLASH_JAVA :=$(ALT_SLASH_JAVA)
78else
79 SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
80endif
81
82# JDK_DEVTOOLS_DIR: common path for all the java devtools
83ifdef ALT_JDK_DEVTOOLS_DIR
84 JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
85else
86 JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
87endif
88
89# COMPILER_PATH: path to where the compiler and tools are installed.
90# NOTE: Must end with / so that it could be empty, allowing PATH usage.
91ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
92 COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
93else
94 # Careful here, COMPILER_VERSION may not be defined yet (see Compiler.gmk)
95 # If the place where we keep a set of Sun Studio compilers doesn't exist,
96 # try and use /opt/SUNWspro, the default location for the SS compilers.
97 # (DirExists checks for this path twice, an automount double check)
98 _SUNSTUDIO_SET_ROOT=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/SUNWspro
99 SUNSTUDIO_SET_ROOT:=$(call DirExists,$(_SUNSTUDIO_SET_ROOT),$(_SUNSTUDIO_SET_ROOT),)
100 ifneq ($(SUNSTUDIO_SET_ROOT),)
101 COMPILER_PATH =$(SUNSTUDIO_SET_ROOT)/$(COMPILER_VERSION)/bin/
102 else
103 COMPILER_PATH =/opt/SUNWspro/bin/
104 endif
105endif
106
107# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
108# NOTE: Must end with / so that it could be empty, allowing PATH usage.
109ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
110 DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
111else
112 ifdef ALT_JDK_DEVTOOLS_DIR
113 DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
114 else
115 ifdef OPENJDK
116 DEVTOOLS_PATH = /usr/bin/
117 else
118 DEVTOOLS_PATH =$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/bin/
119 endif
120 endif
121endif
122
123# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
124# _BOOTDIR2: Second choice
125ifndef ALT_BOOTDIR
126 _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
127 _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
128endif
129
130# GCC_COMPILER_PATH: path to where the gcc/g++ compiler and tools are installed
131# NOTE: Must end with / so that it could be empty, allowing PATH usage.
132ifneq "$(origin ALT_GCC_COMPILER_PATH)" "undefined"
133 GCC_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC_COMPILER_PATH))
134else
135 GCC_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/gnucc/bin/
136endif
137
138
139# Always build headless on Solaris
140BUILD_HEADLESS = true
141
142_CUPS_HEADERS_PATH=/opt/sfw/cups/include
143
144# Import JDK images allow for partial builds, components not built are
145# imported (or copied from) these import areas when needed.
146
147# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
148# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
149ifdef ALT_BUILD_JDK_IMPORT_PATH
150 BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
151else
152 BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
153endif
154BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
155
156# JDK_IMPORT_PATH: location of previously built JDK (this version) to import
157ifdef ALT_JDK_IMPORT_PATH
158 JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
159else
160 JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
161endif
162JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
163
164# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
165ifdef ALT_HOTSPOT_IMPORT_PATH
166 HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
167else
168 HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
169endif
170HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
171
172# HOTSPOT_CLIENT_PATH: location of client jvm library file.
173ifeq ($(ARCH_DATA_MODEL), 32)
174 ifdef ALT_HOTSPOT_CLIENT_PATH
175 HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
176 else
177 HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
178 endif
179 HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
180endif
181
182# HOTSPOT_SERVER_PATH: location of server jvm library file.
183ifdef ALT_HOTSPOT_SERVER_PATH
184 HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
185else
186 HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
187endif
188HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
189