Mercurial > hg > truffle
annotate make/linux/makefiles/rules.make @ 15734:bc37e2efc0c2
[inlining-2] fixing input as instance final rather than passing it over and over
author | Miguel Garcia <miguel.m.garcia@oracle.com> |
---|---|
date | Sun, 18 May 2014 14:05:36 +0200 |
parents | e522a00b91aa |
children |
rev | line source |
---|---|
0 | 1 # |
6842
b9a9ed0f8eeb
7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents:
4891
diff
changeset
|
2 # Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
971
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
971
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
971
diff
changeset
|
21 # questions. |
0 | 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 DEMANGLER = c++filt | |
31 DEMANGLE = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@ | |
32 | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
33 # $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++). |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
34 CC_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
35 CXX_COMPILE = $(CXX) $(CXXFLAGS) $(CFLAGS) |
0 | 36 |
37 AS.S = $(AS) $(ASFLAGS) | |
38 | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
39 COMPILE.CC = $(CC_COMPILE) -c |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
40 GENASM.CC = $(CC_COMPILE) -S |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
41 LINK.CC = $(CC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
42 LINK_LIB.CC = $(CC) $(LFLAGS) $(SHARED_FLAG) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
43 PREPROCESS.CC = $(CC_COMPILE) -E |
0 | 44 |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
45 COMPILE.CXX = $(CXX_COMPILE) -c |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
46 GENASM.CXX = $(CXX_COMPILE) -S |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
47 LINK.CXX = $(CXX) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
48 LINK_NOPROF.CXX = $(CXX) $(LFLAGS) $(AOUT_FLAGS) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
49 LINK_LIB.CXX = $(CXX) $(LFLAGS) $(SHARED_FLAG) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
50 PREPROCESS.CXX = $(CXX_COMPILE) -E |
0 | 51 |
2401
7e88bdae86ec
7029017: Additional architecture support for c2 compiler
roland
parents:
2199
diff
changeset
|
52 # cross compiling the jvm with c2 requires host compilers to build |
7e88bdae86ec
7029017: Additional architecture support for c2 compiler
roland
parents:
2199
diff
changeset
|
53 # adlc tool |
7e88bdae86ec
7029017: Additional architecture support for c2 compiler
roland
parents:
2199
diff
changeset
|
54 |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
55 HOST.CXX_COMPILE = $(HOSTCXX) $(CXXFLAGS) $(CFLAGS) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
56 HOST.COMPILE.CXX = $(HOST.CXX_COMPILE) -c |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
57 HOST.LINK_NOPROF.CXX = $(HOSTCXX) $(LFLAGS) $(AOUT_FLAGS) |
2401
7e88bdae86ec
7029017: Additional architecture support for c2 compiler
roland
parents:
2199
diff
changeset
|
58 |
7e88bdae86ec
7029017: Additional architecture support for c2 compiler
roland
parents:
2199
diff
changeset
|
59 |
0 | 60 # Effect of REMOVE_TARGET is to delete out-of-date files during "gnumake -k". |
61 REMOVE_TARGET = rm -f $@ | |
62 | |
63 # Note use of ALT_BOOTDIR to explicitly specify location of java and | |
64 # javac; this is the same environment variable used in the J2SE build | |
65 # process for overriding the default spec, which is BOOTDIR. | |
66 # Note also that we fall back to using JAVA_HOME if neither of these is | |
67 # specified. | |
68 | |
69 ifdef ALT_BOOTDIR | |
70 | |
71 RUN.JAVA = $(ALT_BOOTDIR)/bin/java | |
72 RUN.JAVAP = $(ALT_BOOTDIR)/bin/javap | |
73 RUN.JAVAH = $(ALT_BOOTDIR)/bin/javah | |
74 RUN.JAR = $(ALT_BOOTDIR)/bin/jar | |
75 COMPILE.JAVAC = $(ALT_BOOTDIR)/bin/javac | |
76 COMPILE.RMIC = $(ALT_BOOTDIR)/bin/rmic | |
77 BOOT_JAVA_HOME = $(ALT_BOOTDIR) | |
78 | |
79 else | |
80 | |
81 ifdef BOOTDIR | |
82 | |
83 RUN.JAVA = $(BOOTDIR)/bin/java | |
84 RUN.JAVAP = $(BOOTDIR)/bin/javap | |
85 RUN.JAVAH = $(BOOTDIR)/bin/javah | |
86 RUN.JAR = $(BOOTDIR)/bin/jar | |
87 COMPILE.JAVAC = $(BOOTDIR)/bin/javac | |
88 COMPILE.RMIC = $(BOOTDIR)/bin/rmic | |
89 BOOT_JAVA_HOME = $(BOOTDIR) | |
90 | |
91 else | |
92 | |
93 ifdef JAVA_HOME | |
94 | |
95 RUN.JAVA = $(JAVA_HOME)/bin/java | |
96 RUN.JAVAP = $(JAVA_HOME)/bin/javap | |
97 RUN.JAVAH = $(JAVA_HOME)/bin/javah | |
98 RUN.JAR = $(JAVA_HOME)/bin/jar | |
99 COMPILE.JAVAC = $(JAVA_HOME)/bin/javac | |
100 COMPILE.RMIC = $(JAVA_HOME)/bin/rmic | |
101 BOOT_JAVA_HOME = $(JAVA_HOME) | |
102 | |
103 else | |
104 | |
105 # take from the PATH, if ALT_BOOTDIR, BOOTDIR and JAVA_HOME are not defined | |
106 # note that this is to support hotspot build without SA. To build | |
107 # SA along with hotspot, you need to define ALT_BOOTDIR, BOOTDIR or JAVA_HOME | |
108 | |
109 RUN.JAVA = java | |
110 RUN.JAVAP = javap | |
111 RUN.JAVAH = javah | |
112 RUN.JAR = jar | |
113 COMPILE.JAVAC = javac | |
114 COMPILE.RMIC = rmic | |
115 | |
116 endif | |
117 endif | |
118 endif | |
119 | |
971
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
120 COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS) |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
121 |
0 | 122 SUM = /usr/bin/sum |
123 | |
124 # 'gmake MAKE_VERBOSE=y' gives all the gory details. | |
125 QUIETLY$(MAKE_VERBOSE) = @ | |
126 RUN.JAR$(MAKE_VERBOSE) += >/dev/null | |
127 | |
971
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
128 # Settings for javac |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
129 BOOT_SOURCE_LANGUAGE_VERSION = 6 |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
130 BOOT_TARGET_CLASS_VERSION = 6 |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
131 JAVAC_FLAGS = -g -encoding ascii |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
132 BOOTSTRAP_JAVAC_FLAGS = $(JAVAC_FLAGS) -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION) |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
133 |
0 | 134 # With parallel makes, print a message at the end of compilation. |
135 ifeq ($(findstring j,$(MFLAGS)),j) | |
136 COMPILE_DONE = && { echo Done with $<; } | |
137 endif | |
138 | |
228
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
139 # Include $(NONPIC_OBJ_FILES) definition |
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
140 ifndef LP64 |
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
141 include $(GAMMADIR)/make/pic.make |
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
142 endif |
198 | 143 |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2192
diff
changeset
|
144 include $(GAMMADIR)/make/altsrc.make |
2192
b92c45f2bc75
7016023: Enable building ARM and PPC from src/closed repository
bobv
parents:
1972
diff
changeset
|
145 |
198 | 146 # The non-PIC object files are only generated for 32 bit platforms. |
147 ifdef LP64 | |
0 | 148 %.o: %.cpp |
149 @echo Compiling $< | |
150 $(QUIETLY) $(REMOVE_TARGET) | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
151 $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) |
198 | 152 else |
153 %.o: %.cpp | |
154 @echo Compiling $< | |
155 $(QUIETLY) $(REMOVE_TARGET) | |
156 $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
157 $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
158 $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)) |
198 | 159 endif |
0 | 160 |
161 %.o: %.s | |
162 @echo Assembling $< | |
163 $(QUIETLY) $(REMOVE_TARGET) | |
1972 | 164 $(QUIETLY) $(AS.S) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) |
0 | 165 |
166 %.s: %.cpp | |
167 @echo Generating assembly for $< | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
168 $(QUIETLY) $(GENASM.CXX) -o $@ $< |
0 | 169 $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE) |
170 | |
171 # Intermediate files (for debugging macros) | |
172 %.i: %.cpp | |
173 @echo Preprocessing $< to $@ | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2401
diff
changeset
|
174 $(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE) |
0 | 175 |
176 # Override gnumake built-in rules which do sccs get operations badly. | |
177 # (They put the checked out code in the current directory, not in the | |
178 # directory of the original file.) Since this is a symptom of a teamware | |
179 # failure, and since not all problems can be detected by gnumake due | |
180 # to incomplete dependency checking... just complain and stop. | |
181 %:: s.% | |
182 @echo "=========================================================" | |
183 @echo File $@ | |
184 @echo is out of date with respect to its SCCS file. | |
185 @echo This file may be from an unresolved Teamware conflict. | |
186 @echo This is also a symptom of a Teamware bringover/putback failure | |
187 @echo in which SCCS files are updated but not checked out. | |
188 @echo Check for other out of date files in your workspace. | |
189 @echo "=========================================================" | |
190 @exit 666 | |
191 | |
192 %:: SCCS/s.% | |
193 @echo "=========================================================" | |
194 @echo File $@ | |
195 @echo is out of date with respect to its SCCS file. | |
196 @echo This file may be from an unresolved Teamware conflict. | |
197 @echo This is also a symptom of a Teamware bringover/putback failure | |
198 @echo in which SCCS files are updated but not checked out. | |
199 @echo Check for other out of date files in your workspace. | |
200 @echo "=========================================================" | |
201 @exit 666 | |
202 | |
203 .PHONY: default |