Mercurial > hg > truffle
annotate make/solaris/makefiles/rules.make @ 8063:f35f1fbab3e1
Merge
author | sla |
---|---|
date | Fri, 15 Feb 2013 10:08:25 +0100 |
parents | b9a9ed0f8eeb |
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) 2000, 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:
2426
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:
2426
diff
changeset
|
34 CC_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
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:
2426
diff
changeset
|
39 COMPILE.CC = $(CC_COMPILE) -c |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
40 GENASM.CC = $(CC_COMPILE) -S |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
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:
2426
diff
changeset
|
42 LINK_LIB.CC = $(CC) $(LFLAGS) $(SHARED_FLAG) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
43 PREPROCESS.CC = $(CC_COMPILE) -E |
0 | 44 |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
45 COMPILE.CXX = $(CXX_COMPILE) -c |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
46 GENASM.CXX = $(CXX_COMPILE) -S |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
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:
2426
diff
changeset
|
48 LINK_NOPROF.CXX = $(CXX) $(LFLAGS) $(AOUT_FLAGS) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
49 LINK_LIB.CXX = $(CXX) $(LFLAGS) $(SHARED_FLAG) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
50 PREPROCESS.CXX = $(CXX_COMPILE) -E |
0 | 51 |
52 # Effect of REMOVE_TARGET is to delete out-of-date files during "gnumake -k". | |
53 REMOVE_TARGET = rm -f $@ | |
54 | |
55 # Note use of ALT_BOOTDIR to explicitly specify location of java and | |
56 # javac; this is the same environment variable used in the J2SE build | |
57 # process for overriding the default spec, which is BOOTDIR. | |
58 # Note also that we fall back to using JAVA_HOME if neither of these is | |
59 # specified. | |
60 | |
61 ifdef ALT_BOOTDIR | |
62 | |
63 RUN.JAVA = $(ALT_BOOTDIR)/bin/java | |
64 RUN.JAVAP = $(ALT_BOOTDIR)/bin/javap | |
65 RUN.JAVAH = $(ALT_BOOTDIR)/bin/javah | |
66 RUN.JAR = $(ALT_BOOTDIR)/bin/jar | |
67 COMPILE.JAVAC = $(ALT_BOOTDIR)/bin/javac | |
68 COMPILE.RMIC = $(ALT_BOOTDIR)/bin/rmic | |
69 BOOT_JAVA_HOME = $(ALT_BOOTDIR) | |
70 | |
71 else | |
72 | |
73 ifdef BOOTDIR | |
74 | |
75 RUN.JAVA = $(BOOTDIR)/bin/java | |
76 RUN.JAVAP = $(BOOTDIR)/bin/javap | |
77 RUN.JAVAH = $(BOOTDIR)/bin/javah | |
78 RUN.JAR = $(BOOTDIR)/bin/jar | |
79 COMPILE.JAVAC = $(BOOTDIR)/bin/javac | |
80 COMPILE.RMIC = $(BOOTDIR)/bin/rmic | |
81 BOOT_JAVA_HOME = $(BOOTDIR) | |
82 | |
83 else | |
84 | |
85 ifdef JAVA_HOME | |
86 | |
87 RUN.JAVA = $(JAVA_HOME)/bin/java | |
88 RUN.JAVAP = $(JAVA_HOME)/bin/javap | |
89 RUN.JAVAH = $(JAVA_HOME)/bin/javah | |
90 RUN.JAR = $(JAVA_HOME)/bin/jar | |
91 COMPILE.JAVAC = $(JAVA_HOME)/bin/javac | |
92 COMPILE.RMIC = $(JAVA_HOME)/bin/rmic | |
93 BOOT_JAVA_HOME = $(JAVA_HOME) | |
94 | |
95 else | |
96 | |
97 # take from the PATH, if ALT_BOOTDIR, BOOTDIR and JAVA_HOME are not defined | |
98 # note that this is to support hotspot build without SA. To build | |
99 # SA along with hotspot, you need to define ALT_BOOTDIR, BOOTDIR or JAVA_HOME | |
100 | |
101 RUN.JAVA = java | |
102 RUN.JAVAP = javap | |
103 RUN.JAVAH = javah | |
104 RUN.JAR = jar | |
105 COMPILE.JAVAC = javac | |
106 COMPILE.RMIC = rmic | |
107 | |
108 endif | |
109 endif | |
110 endif | |
111 | |
971
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
112 COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS) |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
113 |
0 | 114 SUM = /usr/bin/sum |
115 | |
116 # 'gmake MAKE_VERBOSE=y' gives all the gory details. | |
117 QUIETLY$(MAKE_VERBOSE) = @ | |
118 RUN.JAR$(MAKE_VERBOSE) += >/dev/null | |
119 | |
971
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
120 # Settings for javac |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
121 BOOT_SOURCE_LANGUAGE_VERSION = 6 |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
122 BOOT_TARGET_CLASS_VERSION = 6 |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
123 JAVAC_FLAGS = -g -encoding ascii |
0fc81f0a8ca8
6873059: Explicitly use -source 6 -target 6 when compiling with the boot jdk
andrew
parents:
235
diff
changeset
|
124 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
|
125 |
0 | 126 # With parallel makes, print a message at the end of compilation. |
127 ifeq ($(findstring j,$(MFLAGS)),j) | |
128 COMPILE_DONE = && { echo Done with $<; } | |
129 endif | |
130 | |
228
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
131 # Include NONPIC_OBJ_FILES definition |
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
132 ifndef LP64 |
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
133 include $(GAMMADIR)/make/pic.make |
f232d7d67023
6717128: Using relative path for ALT_OUTPUTDIR does not work properly
xlu
parents:
198
diff
changeset
|
134 endif |
0 | 135 |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
1972
diff
changeset
|
136 include $(GAMMADIR)/make/altsrc.make |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
1972
diff
changeset
|
137 |
0 | 138 # Sun compiler for 64 bit Solaris does not support building non-PIC object files. |
139 ifdef LP64 | |
140 %.o: %.cpp | |
141 @echo Compiling $< | |
142 $(QUIETLY) $(REMOVE_TARGET) | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
143 $(QUIETLY) $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE) |
0 | 144 else |
145 %.o: %.cpp | |
146 @echo Compiling $< | |
147 $(QUIETLY) $(REMOVE_TARGET) | |
148 $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \ | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
149 $(subst $(VM_PICFLAG), ,$(COMPILE.CXX)) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE), \ |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
150 $(COMPILE.CXX) $(DEPFLAGS) -o $@ $< $(COMPILE_DONE)) |
0 | 151 endif |
152 | |
153 %.o: %.s | |
154 @echo Assembling $< | |
155 $(QUIETLY) $(REMOVE_TARGET) | |
156 $(QUIETLY) $(AS.S) -o $@ $< $(COMPILE_DONE) | |
157 | |
158 %.s: %.cpp | |
159 @echo Generating assembly for $< | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
160 $(QUIETLY) $(GENASM.CXX) -o $@ $< |
0 | 161 $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE) |
162 | |
163 # Intermediate files (for debugging macros) | |
164 %.i: %.cpp | |
165 @echo Preprocessing $< to $@ | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
2426
diff
changeset
|
166 $(QUIETLY) $(PREPROCESS.CXX) $< > $@ $(COMPILE_DONE) |
0 | 167 |
168 # Override gnumake built-in rules which do sccs get operations badly. | |
169 # (They put the checked out code in the current directory, not in the | |
170 # directory of the original file.) Since this is a symptom of a teamware | |
171 # failure, and since not all problems can be detected by gnumake due | |
172 # to incomplete dependency checking... just complain and stop. | |
173 %:: s.% | |
174 @echo "=========================================================" | |
175 @echo File $@ | |
176 @echo is out of date with respect to its SCCS file. | |
177 @echo This file may be from an unresolved Teamware conflict. | |
178 @echo This is also a symptom of a Teamware bringover/putback failure | |
179 @echo in which SCCS files are updated but not checked out. | |
180 @echo Check for other out of date files in your workspace. | |
181 @echo "=========================================================" | |
182 @exit 666 | |
183 | |
184 %:: SCCS/s.% | |
185 @echo "=========================================================" | |
186 @echo File $@ | |
187 @echo is out of date with respect to its SCCS file. | |
188 @echo This file may be from an unresolved Teamware conflict. | |
189 @echo This is also a symptom of a Teamware bringover/putback failure | |
190 @echo in which SCCS files are updated but not checked out. | |
191 @echo Check for other out of date files in your workspace. | |
192 @echo "=========================================================" | |
193 @exit 666 | |
194 | |
195 .PHONY: default |