1 | #
|
---|
2 | # Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved.
|
---|
3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
---|
4 | #
|
---|
5 | # Copyright 2010 netlabs.org. OS/2 parts
|
---|
6 | #
|
---|
7 | # This code is free software; you can redistribute it and/or modify it
|
---|
8 | # under the terms of the GNU General Public License version 2 only, as
|
---|
9 | # published by the Free Software Foundation. Sun designates this
|
---|
10 | # particular file as subject to the "Classpath" exception as provided
|
---|
11 | # by Sun in the LICENSE file that accompanied this code.
|
---|
12 | #
|
---|
13 | # This code is distributed in the hope that it will be useful, but WITHOUT
|
---|
14 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
---|
15 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
---|
16 | # version 2 for more details (a copy is included in the LICENSE file that
|
---|
17 | # accompanied this code).
|
---|
18 | #
|
---|
19 | # You should have received a copy of the GNU General Public License version
|
---|
20 | # 2 along with this work; if not, write to the Free Software Foundation,
|
---|
21 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
---|
22 | #
|
---|
23 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
---|
24 | # CA 95054 USA or visit www.sun.com if you need additional information or
|
---|
25 | # have any questions.
|
---|
26 | #
|
---|
27 |
|
---|
28 | #
|
---|
29 | # Definitions for OS/2.
|
---|
30 | #
|
---|
31 |
|
---|
32 | # Default for COMPILER_WARNINGS_FATAL on OS/2 (C++ compiler warnings)
|
---|
33 | # Level: Default is 3, 0 means none, 4 is the most but may be unreliable
|
---|
34 | # Some makefiles may have set this to 0 to turn off warnings completely,
|
---|
35 | # which also effectively creates a COMPILER_WARNINGS_FATAL=false situation.
|
---|
36 | # Program.gmk may turn this down to 2 (building .exe's).
|
---|
37 | ifndef COMPILER_WARNING_LEVEL
|
---|
38 | COMPILER_WARNING_LEVEL=3
|
---|
39 | endif
|
---|
40 | ifndef COMPILER_WARNINGS_FATAL
|
---|
41 | COMPILER_WARNINGS_FATAL=false
|
---|
42 | endif
|
---|
43 |
|
---|
44 | # OS/2 should use parallel compilation for best build times
|
---|
45 | ifndef COMPILE_APPROACH
|
---|
46 | COMPILE_APPROACH = normal
|
---|
47 | endif
|
---|
48 |
|
---|
49 | # Indication that we are doing an incremental build.
|
---|
50 | # This may trigger the creation of make depend files.
|
---|
51 | ifndef INCREMENTAL_BUILD
|
---|
52 | INCREMENTAL_BUILD = false
|
---|
53 | endif
|
---|
54 |
|
---|
55 | # FullPath just makes sure it never ends with a / and no duplicates
|
---|
56 | define FullPath
|
---|
57 | $(shell cd $1 2> $(DEV_NULL) && pwd)
|
---|
58 | endef
|
---|
59 |
|
---|
60 | # OptFullPath: Absolute path name of a dir that might not initially exist.
|
---|
61 | define OptFullPath
|
---|
62 | $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
|
---|
63 | endef
|
---|
64 |
|
---|
65 | # System drive
|
---|
66 | ifdef SYSTEM_INI
|
---|
67 | _system_drive :=$(firstword $(subst :, ,$(SYSTEM_INI))):
|
---|
68 | endif
|
---|
69 | _system_drive:=$(call CheckValue,_system_drive,C:)
|
---|
70 |
|
---|
71 | # Location on system where jdk installs might be
|
---|
72 | ifndef PROGRAMS
|
---|
73 | USRJDKINSTANCES_PATH :="$(subst \,/,$(PROGRAMS))"
|
---|
74 | else
|
---|
75 | USRJDKINSTANCES_PATH :=$(_system_drive)/
|
---|
76 | endif
|
---|
77 | USRJDKINSTANCES_PATH := $(call FullPath,$(USRJDKINSTANCES_PATH))
|
---|
78 |
|
---|
79 | # UNIXCOMMAND_PATH: path to where the most common Unix commands are.
|
---|
80 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
81 | ifdef ALT_UNIXCOMMAND_PATH
|
---|
82 | xALT_UNIXCOMMAND_PATH :="$(subst \,/,$(ALT_UNIXCOMMAND_PATH))"
|
---|
83 | fxALT_UNIXCOMMAND_PATH :=$(call FullPath,$(xALT_UNIXCOMMAND_PATH))
|
---|
84 | UNIXCOMMAND_PATH :=$(call PrefixPath,$(fxALT_UNIXCOMMAND_PATH))
|
---|
85 | else
|
---|
86 | ifdef UNIXROOT
|
---|
87 | # assume UNIXROOT is properly set (note: /bin is not used on OS/2)
|
---|
88 | UNIXCOMMAND_PATH := $(subst \,/,$(UNIXROOT)/usr/bin/)
|
---|
89 | else
|
---|
90 | # assume commands are in PATH
|
---|
91 | UNIXCOMMAND_PATH :=
|
---|
92 | endif
|
---|
93 | endif
|
---|
94 | UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH)
|
---|
95 |
|
---|
96 | # USRBIN_PATH: path to where the most common Unix commands are.
|
---|
97 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
98 | ifdef ALT_USRBIN_PATH
|
---|
99 | xALT_USRBIN_PATH :="$(subst \,/,$(ALT_USRBIN_PATH))"
|
---|
100 | fxALT_USRBIN_PATH :=$(call FullPath,$(xALT_USRBIN_PATH))
|
---|
101 | USRBIN_PATH :=$(call PrefixPath,$(fxALT_USRBIN_PATH))
|
---|
102 | else
|
---|
103 | ifdef UNIXROOT
|
---|
104 | # assume UNIXROOT is properly set
|
---|
105 | USRBIN_PATH := $(subst \,/,$(UNIXROOT)/usr/bin/)
|
---|
106 | else
|
---|
107 | # assume commands are in PATH
|
---|
108 | USRBIN_PATH :=
|
---|
109 | endif
|
---|
110 | endif
|
---|
111 | USRBIN_PATH:=$(call AltCheckSpaces,USRBIN_PATH)
|
---|
112 |
|
---|
113 | # SLASH_JAVA: location of all network accessable files
|
---|
114 | ifdef ALT_SLASH_JAVA
|
---|
115 | xALT_SLASH_JAVA :="$(subst \,/,$(ALT_SLASH_JAVA))"
|
---|
116 | SLASH_JAVA :=$(call FullPath,$(xALT_SLASH_JAVA))
|
---|
117 | else
|
---|
118 | ifdef ALT_JDK_JAVA_DRIVE
|
---|
119 | SLASH_JAVA =$(JDK_JAVA_DRIVE)
|
---|
120 | else
|
---|
121 | SLASH_JAVA =J:
|
---|
122 | endif
|
---|
123 | endif
|
---|
124 | SLASH_JAVA:=$(call AltCheckSpaces,SLASH_JAVA)
|
---|
125 | SLASH_JAVA:=$(call AltCheckValue,SLASH_JAVA)
|
---|
126 |
|
---|
127 | # JDK_DEVTOOLS_DIR: common path for all the java devtools
|
---|
128 | ifdef ALT_JDK_DEVTOOLS_DIR
|
---|
129 | xALT_JDK_DEVTOOLS_DIR :="$(subst \,/,$(ALT_JDK_DEVTOOLS_DIR))"
|
---|
130 | JDK_DEVTOOLS_DIR :=$(call FullPath,$(xALT_JDK_DEVTOOLS_DIR))
|
---|
131 | else
|
---|
132 | JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
|
---|
133 | endif
|
---|
134 | JDK_DEVTOOLS_DIR:=$(call AltCheckSpaces,JDK_DEVTOOLS_DIR)
|
---|
135 | JDK_DEVTOOLS_DIR:=$(call AltCheckValue,JDK_DEVTOOLS_DIR)
|
---|
136 |
|
---|
137 | # COMPILER_PATH: path to where the compiler and tools are installed.
|
---|
138 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
139 | ifdef ALT_COMPILER_PATH
|
---|
140 | xALT_COMPILER_PATH :="$(subst \,/,$(ALT_COMPILER_PATH))"
|
---|
141 | fxALT_COMPILER_PATH :=$(call FullPath,$(xALT_COMPILER_PATH))
|
---|
142 | COMPILER_PATH :=$(call PrefixPath,$(fxALT_COMPILER_PATH))
|
---|
143 | else
|
---|
144 | COMPILER_PATH :=$(call PrefixPath,$(_compiler_bin))
|
---|
145 | endif
|
---|
146 | COMPILER_PATH :=$(call AltCheckSpaces,COMPILER_PATH)
|
---|
147 |
|
---|
148 | # DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
|
---|
149 | # NOTE: Must end with / so that it could be empty, allowing PATH usage.
|
---|
150 | ifdef ALT_DEVTOOLS_PATH
|
---|
151 | xALT_DEVTOOLS_PATH :="$(subst \,/,$(ALT_DEVTOOLS_PATH))"
|
---|
152 | fxALT_DEVTOOLS_PATH :=$(call FullPath,$(xALT_DEVTOOLS_PATH))
|
---|
153 | DEVTOOLS_PATH :=$(call PrefixPath,$(fxALT_DEVTOOLS_PATH))
|
---|
154 | else
|
---|
155 | DEVTOOLS_PATH :=$(UNIXCOMMAND_PATH)
|
---|
156 | endif
|
---|
157 | DEVTOOLS_PATH:=$(call AltCheckSpaces,DEVTOOLS_PATH)
|
---|
158 |
|
---|
159 | # _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
|
---|
160 | # _BOOTDIR2: Second choice
|
---|
161 | ifndef ALT_BOOTDIR
|
---|
162 | _BOOTDIR1 =$(_system_drive)/jdk$(PREVIOUS_JDK_VERSION)
|
---|
163 | _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
|
---|
164 | endif
|
---|
165 |
|
---|
166 | # ODINSDK_HEADERS_PATH: Include directory of Odin32 SDK (OS/2)
|
---|
167 | ifdef ALT_ODINSDK_HEADERS_PATH
|
---|
168 | xALT_ODINSDK_HEADERS_PATH :="$(subst \,/,$(ALT_ODINSDK_HEADERS_PATH))"
|
---|
169 | ODINSDK_HEADERS_PATH :=$(call FullPath,$(xALT_ODINSDK_HEADERS_PATH))
|
---|
170 | endif
|
---|
171 | ODINSDK_HEADERS_PATH :=$(call AltCheckSpaces,ODINSDK_HEADERS_PATH)
|
---|
172 | ODINSDK_HEADERS_PATH :=$(call AltCheckValue,ODINSDK_HEADERS_PATH)
|
---|
173 |
|
---|
174 | # ODINSDK_LIB_PATH: Library directory of Odin32 SDK (OS/2)
|
---|
175 | ifdef ALT_ODINSDK_LIB_PATH
|
---|
176 | xALT_ODINSDK_LIB_PATH :="$(subst \,/,$(ALT_ODINSDK_LIB_PATH))"
|
---|
177 | ODINSDK_LIB_PATH :=$(call FullPath,$(xALT_ODINSDK_LIB_PATH))
|
---|
178 | endif
|
---|
179 | ODINSDK_LIB_PATH :=$(call AltCheckSpaces,ODINSDK_LIB_PATH)
|
---|
180 | ODINSDK_LIB_PATH :=$(call AltCheckValue,ODINSDK_LIB_PATH)
|
---|
181 |
|
---|
182 | # ODINSDK_DBGLIB_PATH: Debug Library directory of Odin32 SDK (OS/2)
|
---|
183 | ifdef ALT_ODINSDK_DBGLIB_PATH
|
---|
184 | xALT_ODINSDK_DBGLIB_PATH :="$(subst \,/,$(ALT_ODINSDK_DBGLIB_PATH))"
|
---|
185 | ODINSDK_DBGLIB_PATH :=$(call FullPath,$(xALT_ODINSDK_DBGLIB_PATH))
|
---|
186 | endif
|
---|
187 | ODINSDK_DBGLIB_PATH :=$(call AltCheckSpaces,ODINSDK_DBGLIB_PATH)
|
---|
188 | ODINSDK_DBGLIB_PATH :=$(call AltCheckValue,ODINSDK_DBGLIB_PATH)
|
---|
189 |
|
---|
190 | # Import JDK images allow for partial builds, components not built are
|
---|
191 | # imported (or copied from) these import areas when needed.
|
---|
192 |
|
---|
193 | # BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
|
---|
194 | # multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
|
---|
195 | ifdef ALT_BUILD_JDK_IMPORT_PATH
|
---|
196 | BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
|
---|
197 | else
|
---|
198 | BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
|
---|
199 | endif
|
---|
200 | BUILD_JDK_IMPORT_PATH:=$(call AltCheckSpaces,BUILD_JDK_IMPORT_PATH)
|
---|
201 | BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
|
---|
202 |
|
---|
203 | # JDK_IMPORT_PATH: location of previously built JDK (this version) to import
|
---|
204 | ifdef ALT_JDK_IMPORT_PATH
|
---|
205 | JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
|
---|
206 | else
|
---|
207 | JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
|
---|
208 | endif
|
---|
209 | JDK_IMPORT_PATH:=$(call AltCheckSpaces,JDK_IMPORT_PATH)
|
---|
210 | JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
|
---|
211 |
|
---|
212 | # HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
|
---|
213 | ifdef ALT_HOTSPOT_IMPORT_PATH
|
---|
214 | HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
|
---|
215 | else
|
---|
216 | HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
|
---|
217 | endif
|
---|
218 | HOTSPOT_IMPORT_PATH:=$(call AltCheckSpaces,HOTSPOT_IMPORT_PATH)
|
---|
219 | HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
|
---|
220 |
|
---|
221 | # HOTSPOT_CLIENT_PATH: location of client jvm library file.
|
---|
222 | ifeq ($(ARCH_DATA_MODEL), 32)
|
---|
223 | ifdef ALT_HOTSPOT_CLIENT_PATH
|
---|
224 | HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
|
---|
225 | else
|
---|
226 | HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
|
---|
227 | endif
|
---|
228 | HOTSPOT_CLIENT_PATH:=$(call AltCheckSpaces,HOTSPOT_CLIENT_PATH)
|
---|
229 | HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
|
---|
230 | endif
|
---|
231 |
|
---|
232 | # HOTSPOT_SERVER_PATH: location of server jvm library file.
|
---|
233 | ifdef ALT_HOTSPOT_SERVER_PATH
|
---|
234 | HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
|
---|
235 | else
|
---|
236 | HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
|
---|
237 | endif
|
---|
238 | HOTSPOT_SERVER_PATH:=$(call AltCheckSpaces,HOTSPOT_SERVER_PATH)
|
---|
239 | HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
|
---|
240 |
|
---|
241 | # HOTSPOT_LIB_PATH: location of jvm.lib file.
|
---|
242 | ifdef ALT_HOTSPOT_LIB_PATH
|
---|
243 | xALT_HOTSPOT_LIB_PATH :="$(subst \,/,$(ALT_HOTSPOT_LIB_PATH))"
|
---|
244 | HOTSPOT_LIB_PATH :=$(call FullPath,$(xALT_HOTSPOT_LIB_PATH))
|
---|
245 | else
|
---|
246 | HOTSPOT_LIB_PATH =$(HOTSPOT_IMPORT_PATH)/lib
|
---|
247 | endif
|
---|
248 | HOTSPOT_LIB_PATH:=$(call AltCheckSpaces,HOTSPOT_LIB_PATH)
|
---|
249 | HOTSPOT_LIB_PATH:=$(call AltCheckValue,HOTSPOT_LIB_PATH)
|
---|
250 |
|
---|