author | trims |
Fri, 22 Jul 2011 23:42:46 -0700 | |
changeset 10034 | 2143c41c2a90 |
parent 8868 | 1bae515b806b |
child 11721 | dcd1f62c9caf |
permissions | -rw-r--r-- |
1 | 1 |
# |
8114
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
8107
diff
changeset
|
2 |
# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
1 | 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. |
|
8 |
# |
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
# accompanied this code). |
|
14 |
# |
|
15 |
# You should have received a copy of the GNU General Public License version |
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
# |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3818
diff
changeset
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3818
diff
changeset
|
20 |
# or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
3818
diff
changeset
|
21 |
# questions. |
1 | 22 |
# |
23 |
# |
|
24 |
||
25 |
# Common rules/macros for the vm, adlc. |
|
26 |
||
27 |
# Tell make that .cpp is important |
|
28 |
.SUFFIXES: .cpp $(SUFFIXES) |
|
29 |
||
30 |
# For now. Other makefiles use CPP as the c++ compiler, but that should really |
|
31 |
# name the preprocessor. |
|
32 |
ifeq ($(CCC),) |
|
33 |
CCC = $(CPP) |
|
34 |
endif |
|
35 |
||
36 |
DEMANGLER = c++filt |
|
37 |
DEMANGLE = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@ |
|
38 |
||
39 |
# $(CC) is the c compiler (cc/gcc), $(CCC) is the c++ compiler (CC/g++). |
|
40 |
C_COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) |
|
41 |
CC_COMPILE = $(CCC) $(CPPFLAGS) $(CFLAGS) |
|
42 |
||
43 |
AS.S = $(AS) $(ASFLAGS) |
|
44 |
||
45 |
COMPILE.c = $(C_COMPILE) -c |
|
46 |
GENASM.c = $(C_COMPILE) -S |
|
47 |
LINK.c = $(CC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS) |
|
48 |
LINK_LIB.c = $(CC) $(LFLAGS) $(SHARED_FLAG) |
|
49 |
PREPROCESS.c = $(C_COMPILE) -E |
|
50 |
||
51 |
COMPILE.CC = $(CC_COMPILE) -c |
|
52 |
GENASM.CC = $(CC_COMPILE) -S |
|
53 |
LINK.CC = $(CCC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS) |
|
54 |
LINK_NOPROF.CC = $(CCC) $(LFLAGS) $(AOUT_FLAGS) |
|
55 |
LINK_LIB.CC = $(CCC) $(LFLAGS) $(SHARED_FLAG) |
|
56 |
PREPROCESS.CC = $(CC_COMPILE) -E |
|
57 |
||
8868
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
58 |
# cross compiling the jvm with c2 requires host compilers to build |
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
59 |
# adlc tool |
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
60 |
|
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
61 |
HOST.CC_COMPILE = $(HOSTCPP) $(CPPFLAGS) $(CFLAGS) |
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
62 |
HOST.COMPILE.CC = $(HOST.CC_COMPILE) -c |
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
63 |
HOST.LINK_NOPROF.CC = $(HOSTCPP) $(LFLAGS) $(AOUT_FLAGS) |
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
64 |
|
1bae515b806b
7029017: Additional architecture support for c2 compiler
roland
parents:
8114
diff
changeset
|
65 |
|
1 | 66 |
# Effect of REMOVE_TARGET is to delete out-of-date files during "gnumake -k". |
67 |
REMOVE_TARGET = rm -f $@ |
|
68 |
||
69 |
# Synonyms. |
|
70 |
COMPILE.cpp = $(COMPILE.CC) |
|
71 |
GENASM.cpp = $(GENASM.CC) |
|
72 |
LINK.cpp = $(LINK.CC) |
|
73 |
LINK_LIB.cpp = $(LINK_LIB.CC) |
|
74 |
PREPROCESS.cpp = $(PREPROCESS.CC) |
|
75 |
||
76 |
# Note use of ALT_BOOTDIR to explicitly specify location of java and |
|
77 |
# javac; this is the same environment variable used in the J2SE build |
|
78 |
# process for overriding the default spec, which is BOOTDIR. |
|
79 |
# Note also that we fall back to using JAVA_HOME if neither of these is |
|
80 |
# specified. |
|
81 |
||
82 |
ifdef ALT_BOOTDIR |
|
83 |
||
84 |
RUN.JAVA = $(ALT_BOOTDIR)/bin/java |
|
85 |
RUN.JAVAP = $(ALT_BOOTDIR)/bin/javap |
|
86 |
RUN.JAVAH = $(ALT_BOOTDIR)/bin/javah |
|
87 |
RUN.JAR = $(ALT_BOOTDIR)/bin/jar |
|
88 |
COMPILE.JAVAC = $(ALT_BOOTDIR)/bin/javac |
|
89 |
COMPILE.RMIC = $(ALT_BOOTDIR)/bin/rmic |
|
90 |
BOOT_JAVA_HOME = $(ALT_BOOTDIR) |
|
91 |
||
92 |
else |
|
93 |
||
94 |
ifdef BOOTDIR |
|
95 |
||
96 |
RUN.JAVA = $(BOOTDIR)/bin/java |
|
97 |
RUN.JAVAP = $(BOOTDIR)/bin/javap |
|
98 |
RUN.JAVAH = $(BOOTDIR)/bin/javah |
|
99 |
RUN.JAR = $(BOOTDIR)/bin/jar |
|
100 |
COMPILE.JAVAC = $(BOOTDIR)/bin/javac |
|
101 |
COMPILE.RMIC = $(BOOTDIR)/bin/rmic |
|
102 |
BOOT_JAVA_HOME = $(BOOTDIR) |
|
103 |
||
104 |
else |
|
105 |
||
106 |
ifdef JAVA_HOME |
|
107 |
||
108 |
RUN.JAVA = $(JAVA_HOME)/bin/java |
|
109 |
RUN.JAVAP = $(JAVA_HOME)/bin/javap |
|
110 |
RUN.JAVAH = $(JAVA_HOME)/bin/javah |
|
111 |
RUN.JAR = $(JAVA_HOME)/bin/jar |
|
112 |
COMPILE.JAVAC = $(JAVA_HOME)/bin/javac |
|
113 |
COMPILE.RMIC = $(JAVA_HOME)/bin/rmic |
|
114 |
BOOT_JAVA_HOME = $(JAVA_HOME) |
|
115 |
||
116 |
else |
|
117 |
||
118 |
# take from the PATH, if ALT_BOOTDIR, BOOTDIR and JAVA_HOME are not defined |
|
119 |
# note that this is to support hotspot build without SA. To build |
|
120 |
# SA along with hotspot, you need to define ALT_BOOTDIR, BOOTDIR or JAVA_HOME |
|
121 |
||
122 |
RUN.JAVA = java |
|
123 |
RUN.JAVAP = javap |
|
124 |
RUN.JAVAH = javah |
|
125 |
RUN.JAR = jar |
|
126 |
COMPILE.JAVAC = javac |
|
127 |
COMPILE.RMIC = rmic |
|
128 |
||
129 |
endif |
|
130 |
endif |
|
131 |
endif |
|
132 |
||
3818
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
133 |
COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS) |
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
134 |
|
1 | 135 |
SUM = /usr/bin/sum |
136 |
||
137 |
# 'gmake MAKE_VERBOSE=y' gives all the gory details. |
|
138 |
QUIETLY$(MAKE_VERBOSE) = @ |
|
139 |
RUN.JAR$(MAKE_VERBOSE) += >/dev/null |
|
140 |
||
3818
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
141 |
# Settings for javac |
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
142 |
BOOT_SOURCE_LANGUAGE_VERSION = 6 |
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
143 |
BOOT_TARGET_CLASS_VERSION = 6 |
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
144 |
JAVAC_FLAGS = -g -encoding ascii |
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
145 |
BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION) |
75004bf9026c
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
781
diff
changeset
|
146 |
|
1 | 147 |
# With parallel makes, print a message at the end of compilation. |
148 |
ifeq ($(findstring j,$(MFLAGS)),j) |
|
149 |
COMPILE_DONE = && { echo Done with $<; } |
|
150 |
endif |
|
151 |
||
774
e71318ea23e8
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
744
diff
changeset
|
152 |
# Include $(NONPIC_OBJ_FILES) definition |
e71318ea23e8
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
744
diff
changeset
|
153 |
ifndef LP64 |
e71318ea23e8
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
744
diff
changeset
|
154 |
include $(GAMMADIR)/make/pic.make |
e71318ea23e8
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
744
diff
changeset
|
155 |
endif |
744 | 156 |
|
8114
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
8107
diff
changeset
|
157 |
include $(GAMMADIR)/make/altsrc.make |
8107
78e5bd944384
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
7397
diff
changeset
|
158 |
|
744 | 159 |
# The non-PIC object files are only generated for 32 bit platforms. |
160 |
ifdef LP64 |
|
1 | 161 |
%.o: %.cpp |
162 |
@echo Compiling $< |
|
163 |
$(QUIETLY) $(REMOVE_TARGET) |
|
7397 | 164 |
$(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) |
744 | 165 |
else |
166 |
%.o: %.cpp |
|
167 |
@echo Compiling $< |
|
168 |
$(QUIETLY) $(REMOVE_TARGET) |
|
169 |
$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ |
|
7397 | 170 |
$(subst $(VM_PICFLAG), ,$(COMPILE.CC)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ |
171 |
$(COMPILE.CC) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)) |
|
744 | 172 |
endif |
1 | 173 |
|
174 |
%.o: %.s |
|
175 |
@echo Assembling $< |
|
176 |
$(QUIETLY) $(REMOVE_TARGET) |
|
7397 | 177 |
$(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) |
1 | 178 |
|
179 |
%.s: %.cpp |
|
180 |
@echo Generating assembly for $< |
|
181 |
$(QUIETLY) $(GENASM.CC) -o $@ $< |
|
182 |
$(QUIETLY) $(DEMANGLE) $(COMPILE_DONE) |
|
183 |
||
184 |
# Intermediate files (for debugging macros) |
|
185 |
%.i: %.cpp |
|
186 |
@echo Preprocessing $< to $@ |
|
187 |
$(QUIETLY) $(PREPROCESS.CC) $< > $@ $(COMPILE_DONE) |
|
188 |
||
189 |
# Override gnumake built-in rules which do sccs get operations badly. |
|
190 |
# (They put the checked out code in the current directory, not in the |
|
191 |
# directory of the original file.) Since this is a symptom of a teamware |
|
192 |
# failure, and since not all problems can be detected by gnumake due |
|
193 |
# to incomplete dependency checking... just complain and stop. |
|
194 |
%:: s.% |
|
195 |
@echo "=========================================================" |
|
196 |
@echo File $@ |
|
197 |
@echo is out of date with respect to its SCCS file. |
|
198 |
@echo This file may be from an unresolved Teamware conflict. |
|
199 |
@echo This is also a symptom of a Teamware bringover/putback failure |
|
200 |
@echo in which SCCS files are updated but not checked out. |
|
201 |
@echo Check for other out of date files in your workspace. |
|
202 |
@echo "=========================================================" |
|
203 |
@exit 666 |
|
204 |
||
205 |
%:: SCCS/s.% |
|
206 |
@echo "=========================================================" |
|
207 |
@echo File $@ |
|
208 |
@echo is out of date with respect to its SCCS file. |
|
209 |
@echo This file may be from an unresolved Teamware conflict. |
|
210 |
@echo This is also a symptom of a Teamware bringover/putback failure |
|
211 |
@echo in which SCCS files are updated but not checked out. |
|
212 |
@echo Check for other out of date files in your workspace. |
|
213 |
@echo "=========================================================" |
|
214 |
@exit 666 |
|
215 |
||
216 |
.PHONY: default |