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 Linux.
|
---|
28 | #
|
---|
29 |
|
---|
30 | # MOTIF_REQUIRED setting must be true or false
|
---|
31 | ifdef 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
|
---|
37 | else
|
---|
38 | # Default setting (Motif libraries not used with OpenJDK)
|
---|
39 | ifdef OPENJDK
|
---|
40 | MOTIF_REQUIRED=false
|
---|
41 | else
|
---|
42 | MOTIF_REQUIRED=true
|
---|
43 | endif
|
---|
44 | endif
|
---|
45 |
|
---|
46 | # Default for COMPILER_WARNINGS_FATAL on Linux (C & C++ compiler warnings)
|
---|
47 | ifndef COMPILER_WARNINGS_FATAL
|
---|
48 | COMPILER_WARNINGS_FATAL=false
|
---|
49 | endif
|
---|
50 |
|
---|
51 | # Linux should use parallel compilation for best build times
|
---|
52 | ifndef COMPILE_APPROACH
|
---|
53 | COMPILE_APPROACH = parallel
|
---|
54 | endif
|
---|
55 |
|
---|
56 | # Indication that we are doing an incremental build.
|
---|
57 | # This may trigger the creation of make depend files.
|
---|
58 | ifndef INCREMENTAL_BUILD
|
---|
59 | INCREMENTAL_BUILD = false
|
---|
60 | endif
|
---|
61 |
|
---|
62 | # FullPath just makes sure it never ends with a / and no duplicates
|
---|
63 | define FullPath
|
---|
64 | $(shell cd $1 2> $(DEV_NULL) && pwd)
|
---|
65 | endef
|
---|
66 |
|
---|
67 | # OptFullPath: Absolute path name of a dir that might not initially exist.
|
---|
68 | define OptFullPath
|
---|
69 | $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
|
---|
70 | endef
|
---|
71 |
|
---|
72 | # Location on system where jdk installs might be
|
---|
73 | USRJDKINSTANCES_PATH =/opt/java
|
---|
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.
|
---|
77 | ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
|
---|
78 | UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
|
---|
79 | else
|
---|
80 | UNIXCOMMAND_PATH = /bin/
|
---|
81 | endif
|
---|
82 |
|
---|
83 | # USRBIN_PATH: path to where the most common Unix commands are.
|
---|
84 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
85 | ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
|
---|
86 | USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
|
---|
87 | else
|
---|
88 | USRBIN_PATH = /usr/bin/
|
---|
89 | endif
|
---|
90 |
|
---|
91 | # UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
|
---|
92 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
93 | ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
|
---|
94 | UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
|
---|
95 | else
|
---|
96 | UNIXCCS_PATH = /usr/ccs/bin/
|
---|
97 | endif
|
---|
98 |
|
---|
99 | # SLASH_JAVA: location of all network accessable files
|
---|
100 | ifdef ALT_SLASH_JAVA
|
---|
101 | SLASH_JAVA :=$(ALT_SLASH_JAVA)
|
---|
102 | else
|
---|
103 | SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
|
---|
104 | endif
|
---|
105 |
|
---|
106 | # JDK_DEVTOOLS_DIR: common path for all the java devtools
|
---|
107 | ifdef ALT_JDK_DEVTOOLS_DIR
|
---|
108 | JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
|
---|
109 | else
|
---|
110 | JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
|
---|
111 | endif
|
---|
112 |
|
---|
113 | # COMPILER_PATH: path to where the compiler and tools are installed.
|
---|
114 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
115 | ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
|
---|
116 | COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
|
---|
117 | else
|
---|
118 | COMPILER_PATH =/usr/bin/
|
---|
119 | endif
|
---|
120 |
|
---|
121 | # DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
---|
122 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
123 | ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
|
---|
124 | DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
|
---|
125 | else
|
---|
126 | DEVTOOLS_PATH =/usr/bin/
|
---|
127 | endif
|
---|
128 |
|
---|
129 | # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
|
---|
130 | # _BOOTDIR2: Second choice
|
---|
131 | ifndef ALT_BOOTDIR
|
---|
132 | _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
|
---|
133 | _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
|
---|
134 | endif
|
---|
135 |
|
---|
136 | # MOTIF_DIR: must point to a directory containing the Xm and include directories
|
---|
137 | ifdef ALT_MOTIF_DIR
|
---|
138 | MOTIF_DIR=$(ALT_MOTIF_DIR)
|
---|
139 | else
|
---|
140 | ifdef ALT_JDK_DEVTOOLS_DIR
|
---|
141 | MOTIF_DIR = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/motif-$(ARCH)
|
---|
142 | else
|
---|
143 | ifdef OPENJDK
|
---|
144 | MOTIF_DIR = /usr
|
---|
145 | else
|
---|
146 | MOTIF_DIR = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/motif-$(ARCH)
|
---|
147 | endif
|
---|
148 | endif
|
---|
149 | endif
|
---|
150 |
|
---|
151 | # Motif settings, always build headless on Linux
|
---|
152 | STATIC_MOTIF=true
|
---|
153 | LIBM=-lm
|
---|
154 | ifeq ($(MOTIF_REQUIRED), true)
|
---|
155 | BUILD_MOTIF21 = true
|
---|
156 | endif
|
---|
157 | BUILD_HEADLESS = true
|
---|
158 | ifeq ($(ARCH_DATA_MODEL), 32)
|
---|
159 | MOTIF_LIB = $(MOTIF_DIR)/lib
|
---|
160 | else
|
---|
161 | MOTIF_LIB = $(MOTIF_DIR)/lib64
|
---|
162 | endif
|
---|
163 | MOTIF_INCLUDE = $(MOTIF_DIR)/include
|
---|
164 |
|
---|
165 | # GCC29_COMPILER_PATH: is the path to where the gcc 2.9 compiler is installed
|
---|
166 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
167 | ifneq "$(origin ALT_GCC29_COMPILER_PATH)" "undefined"
|
---|
168 | GCC29_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC29_COMPILER_PATH))
|
---|
169 | else
|
---|
170 | GCC29_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/gcc29/usr/
|
---|
171 | endif
|
---|
172 |
|
---|
173 | _CUPS_HEADERS_PATH=/usr/include
|
---|
174 |
|
---|
175 | # Import JDK images allow for partial builds, components not built are
|
---|
176 | # imported (or copied from) these import areas when needed.
|
---|
177 |
|
---|
178 | # BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
|
---|
179 | # multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
|
---|
180 | ifdef ALT_BUILD_JDK_IMPORT_PATH
|
---|
181 | BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
|
---|
182 | else
|
---|
183 | BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
|
---|
184 | endif
|
---|
185 | BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
|
---|
186 |
|
---|
187 | # JDK_IMPORT_PATH: location of JDK install tree (this version) to import
|
---|
188 | ifdef ALT_JDK_IMPORT_PATH
|
---|
189 | JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
|
---|
190 | else
|
---|
191 | JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
|
---|
192 | endif
|
---|
193 | JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
|
---|
194 |
|
---|
195 | # HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
|
---|
196 | ifdef ALT_HOTSPOT_IMPORT_PATH
|
---|
197 | HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
|
---|
198 | else
|
---|
199 | HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
|
---|
200 | endif
|
---|
201 | HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
|
---|
202 |
|
---|
203 | # HOTSPOT_CLIENT_PATH: location of client jvm library file.
|
---|
204 | ifeq ($(ARCH_DATA_MODEL), 32)
|
---|
205 | ifdef ALT_HOTSPOT_CLIENT_PATH
|
---|
206 | HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
|
---|
207 | else
|
---|
208 | HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
|
---|
209 | endif
|
---|
210 | HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
|
---|
211 | endif
|
---|
212 |
|
---|
213 | # HOTSPOT_SERVER_PATH: location of server jvm library file.
|
---|
214 | ifdef ALT_HOTSPOT_SERVER_PATH
|
---|
215 | HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
|
---|
216 | else
|
---|
217 | HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
|
---|
218 | endif
|
---|
219 | HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
|
---|
220 |
|
---|