source: trunk/openjdk/jdk/make/common/shared/Defs-linux.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: 7.2 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 Linux.
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 Linux (C & C++ compiler warnings)
47ifndef COMPILER_WARNINGS_FATAL
48 COMPILER_WARNINGS_FATAL=false
49endif
50
51# Linux 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 =/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.
77ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
78 UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
79else
80 UNIXCOMMAND_PATH = /bin/
81endif
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.
85ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
86 USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
87else
88 USRBIN_PATH = /usr/bin/
89endif
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.
93ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
94 UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
95else
96 UNIXCCS_PATH = /usr/ccs/bin/
97endif
98
99# SLASH_JAVA: location of all network accessable files
100ifdef ALT_SLASH_JAVA
101 SLASH_JAVA :=$(ALT_SLASH_JAVA)
102else
103 SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
104endif
105
106# JDK_DEVTOOLS_DIR: common path for all the java devtools
107ifdef ALT_JDK_DEVTOOLS_DIR
108 JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
109else
110 JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
111endif
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.
115ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
116 COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
117else
118 COMPILER_PATH =/usr/bin/
119endif
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.
123ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
124 DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
125else
126 DEVTOOLS_PATH =/usr/bin/
127endif
128
129# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
130# _BOOTDIR2: Second choice
131ifndef ALT_BOOTDIR
132 _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
133 _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
134endif
135
136# MOTIF_DIR: must point to a directory containing the Xm and include directories
137ifdef ALT_MOTIF_DIR
138 MOTIF_DIR=$(ALT_MOTIF_DIR)
139else
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
149endif
150
151# Motif settings, always build headless on Linux
152STATIC_MOTIF=true
153LIBM=-lm
154ifeq ($(MOTIF_REQUIRED), true)
155 BUILD_MOTIF21 = true
156endif
157BUILD_HEADLESS = true
158ifeq ($(ARCH_DATA_MODEL), 32)
159 MOTIF_LIB = $(MOTIF_DIR)/lib
160else
161 MOTIF_LIB = $(MOTIF_DIR)/lib64
162endif
163MOTIF_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.
167ifneq "$(origin ALT_GCC29_COMPILER_PATH)" "undefined"
168 GCC29_COMPILER_PATH :=$(call PrefixPath,$(ALT_GCC29_COMPILER_PATH))
169else
170 GCC29_COMPILER_PATH = $(JDK_DEVTOOLS_DIR)/$(PLATFORM)/gcc29/usr/
171endif
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.
180ifdef ALT_BUILD_JDK_IMPORT_PATH
181 BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
182else
183 BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
184endif
185BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
186
187# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
188ifdef ALT_JDK_IMPORT_PATH
189 JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
190else
191 JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
192endif
193JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
194
195# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
196ifdef ALT_HOTSPOT_IMPORT_PATH
197 HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
198else
199 HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
200endif
201HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
202
203# HOTSPOT_CLIENT_PATH: location of client jvm library file.
204ifeq ($(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)
211endif
212
213# HOTSPOT_SERVER_PATH: location of server jvm library file.
214ifdef ALT_HOTSPOT_SERVER_PATH
215 HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
216else
217 HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
218endif
219HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
220
Note: See TracBrowser for help on using the repository browser.