annotate make/linux/makefiles/rules.make @ 196:d1605aabd0a1 jdk7-b30

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:16 -0700
parents a294fd0c4b38
children 9c2ecc2ffb12
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
196
d1605aabd0a1 6719955: Update copyright year
xdono
parents: 91
diff changeset
2 # Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 #
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 #
a61af66fc99e Initial load
duke
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 #
a61af66fc99e Initial load
duke
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 #
a61af66fc99e Initial load
duke
parents:
diff changeset
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 # CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 # have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 # Common rules/macros for the vm, adlc.
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 # Tell make that .cpp is important
a61af66fc99e Initial load
duke
parents:
diff changeset
28 .SUFFIXES: .cpp $(SUFFIXES)
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 # For now. Other makefiles use CPP as the c++ compiler, but that should really
a61af66fc99e Initial load
duke
parents:
diff changeset
31 # name the preprocessor.
a61af66fc99e Initial load
duke
parents:
diff changeset
32 ifeq ($(CCC),)
a61af66fc99e Initial load
duke
parents:
diff changeset
33 CCC = $(CPP)
a61af66fc99e Initial load
duke
parents:
diff changeset
34 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 DEMANGLER = c++filt
a61af66fc99e Initial load
duke
parents:
diff changeset
37 DEMANGLE = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 # $(CC) is the c compiler (cc/gcc), $(CCC) is the c++ compiler (CC/g++).
a61af66fc99e Initial load
duke
parents:
diff changeset
40 C_COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
41 CC_COMPILE = $(CCC) $(CPPFLAGS) $(CFLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 AS.S = $(AS) $(ASFLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 COMPILE.c = $(C_COMPILE) -c
a61af66fc99e Initial load
duke
parents:
diff changeset
46 GENASM.c = $(C_COMPILE) -S
a61af66fc99e Initial load
duke
parents:
diff changeset
47 LINK.c = $(CC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
48 LINK_LIB.c = $(CC) $(LFLAGS) $(SHARED_FLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
49 PREPROCESS.c = $(C_COMPILE) -E
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 COMPILE.CC = $(CC_COMPILE) -c
a61af66fc99e Initial load
duke
parents:
diff changeset
52 GENASM.CC = $(CC_COMPILE) -S
a61af66fc99e Initial load
duke
parents:
diff changeset
53 LINK.CC = $(CCC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
54 LINK_NOPROF.CC = $(CCC) $(LFLAGS) $(AOUT_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
55 LINK_LIB.CC = $(CCC) $(LFLAGS) $(SHARED_FLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
56 PREPROCESS.CC = $(CC_COMPILE) -E
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 # Effect of REMOVE_TARGET is to delete out-of-date files during "gnumake -k".
a61af66fc99e Initial load
duke
parents:
diff changeset
59 REMOVE_TARGET = rm -f $@
a61af66fc99e Initial load
duke
parents:
diff changeset
60
a61af66fc99e Initial load
duke
parents:
diff changeset
61 # Synonyms.
a61af66fc99e Initial load
duke
parents:
diff changeset
62 COMPILE.cpp = $(COMPILE.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
63 GENASM.cpp = $(GENASM.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
64 LINK.cpp = $(LINK.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
65 LINK_LIB.cpp = $(LINK_LIB.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
66 PREPROCESS.cpp = $(PREPROCESS.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 # Note use of ALT_BOOTDIR to explicitly specify location of java and
a61af66fc99e Initial load
duke
parents:
diff changeset
69 # javac; this is the same environment variable used in the J2SE build
a61af66fc99e Initial load
duke
parents:
diff changeset
70 # process for overriding the default spec, which is BOOTDIR.
a61af66fc99e Initial load
duke
parents:
diff changeset
71 # Note also that we fall back to using JAVA_HOME if neither of these is
a61af66fc99e Initial load
duke
parents:
diff changeset
72 # specified.
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 ifdef ALT_BOOTDIR
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 RUN.JAVA = $(ALT_BOOTDIR)/bin/java
a61af66fc99e Initial load
duke
parents:
diff changeset
77 RUN.JAVAP = $(ALT_BOOTDIR)/bin/javap
a61af66fc99e Initial load
duke
parents:
diff changeset
78 RUN.JAVAH = $(ALT_BOOTDIR)/bin/javah
a61af66fc99e Initial load
duke
parents:
diff changeset
79 RUN.JAR = $(ALT_BOOTDIR)/bin/jar
a61af66fc99e Initial load
duke
parents:
diff changeset
80 COMPILE.JAVAC = $(ALT_BOOTDIR)/bin/javac
a61af66fc99e Initial load
duke
parents:
diff changeset
81 COMPILE.RMIC = $(ALT_BOOTDIR)/bin/rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
82 BOOT_JAVA_HOME = $(ALT_BOOTDIR)
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 else
a61af66fc99e Initial load
duke
parents:
diff changeset
85
a61af66fc99e Initial load
duke
parents:
diff changeset
86 ifdef BOOTDIR
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 RUN.JAVA = $(BOOTDIR)/bin/java
a61af66fc99e Initial load
duke
parents:
diff changeset
89 RUN.JAVAP = $(BOOTDIR)/bin/javap
a61af66fc99e Initial load
duke
parents:
diff changeset
90 RUN.JAVAH = $(BOOTDIR)/bin/javah
a61af66fc99e Initial load
duke
parents:
diff changeset
91 RUN.JAR = $(BOOTDIR)/bin/jar
a61af66fc99e Initial load
duke
parents:
diff changeset
92 COMPILE.JAVAC = $(BOOTDIR)/bin/javac
a61af66fc99e Initial load
duke
parents:
diff changeset
93 COMPILE.RMIC = $(BOOTDIR)/bin/rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
94 BOOT_JAVA_HOME = $(BOOTDIR)
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 else
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 ifdef JAVA_HOME
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 RUN.JAVA = $(JAVA_HOME)/bin/java
a61af66fc99e Initial load
duke
parents:
diff changeset
101 RUN.JAVAP = $(JAVA_HOME)/bin/javap
a61af66fc99e Initial load
duke
parents:
diff changeset
102 RUN.JAVAH = $(JAVA_HOME)/bin/javah
a61af66fc99e Initial load
duke
parents:
diff changeset
103 RUN.JAR = $(JAVA_HOME)/bin/jar
a61af66fc99e Initial load
duke
parents:
diff changeset
104 COMPILE.JAVAC = $(JAVA_HOME)/bin/javac
a61af66fc99e Initial load
duke
parents:
diff changeset
105 COMPILE.RMIC = $(JAVA_HOME)/bin/rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
106 BOOT_JAVA_HOME = $(JAVA_HOME)
a61af66fc99e Initial load
duke
parents:
diff changeset
107
a61af66fc99e Initial load
duke
parents:
diff changeset
108 else
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 # take from the PATH, if ALT_BOOTDIR, BOOTDIR and JAVA_HOME are not defined
a61af66fc99e Initial load
duke
parents:
diff changeset
111 # note that this is to support hotspot build without SA. To build
a61af66fc99e Initial load
duke
parents:
diff changeset
112 # SA along with hotspot, you need to define ALT_BOOTDIR, BOOTDIR or JAVA_HOME
a61af66fc99e Initial load
duke
parents:
diff changeset
113
a61af66fc99e Initial load
duke
parents:
diff changeset
114 RUN.JAVA = java
a61af66fc99e Initial load
duke
parents:
diff changeset
115 RUN.JAVAP = javap
a61af66fc99e Initial load
duke
parents:
diff changeset
116 RUN.JAVAH = javah
a61af66fc99e Initial load
duke
parents:
diff changeset
117 RUN.JAR = jar
a61af66fc99e Initial load
duke
parents:
diff changeset
118 COMPILE.JAVAC = javac
a61af66fc99e Initial load
duke
parents:
diff changeset
119 COMPILE.RMIC = rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
122 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
123 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
124
a61af66fc99e Initial load
duke
parents:
diff changeset
125 SUM = /usr/bin/sum
a61af66fc99e Initial load
duke
parents:
diff changeset
126
a61af66fc99e Initial load
duke
parents:
diff changeset
127 # 'gmake MAKE_VERBOSE=y' gives all the gory details.
a61af66fc99e Initial load
duke
parents:
diff changeset
128 QUIETLY$(MAKE_VERBOSE) = @
a61af66fc99e Initial load
duke
parents:
diff changeset
129 RUN.JAR$(MAKE_VERBOSE) += >/dev/null
a61af66fc99e Initial load
duke
parents:
diff changeset
130
a61af66fc99e Initial load
duke
parents:
diff changeset
131 # With parallel makes, print a message at the end of compilation.
a61af66fc99e Initial load
duke
parents:
diff changeset
132 ifeq ($(findstring j,$(MFLAGS)),j)
a61af66fc99e Initial load
duke
parents:
diff changeset
133 COMPILE_DONE = && { echo Done with $<; }
a61af66fc99e Initial load
duke
parents:
diff changeset
134 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
135
a61af66fc99e Initial load
duke
parents:
diff changeset
136 %.o: %.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
137 @echo Compiling $<
a61af66fc99e Initial load
duke
parents:
diff changeset
138 $(QUIETLY) $(REMOVE_TARGET)
a61af66fc99e Initial load
duke
parents:
diff changeset
139 $(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
140
a61af66fc99e Initial load
duke
parents:
diff changeset
141 %.o: %.s
a61af66fc99e Initial load
duke
parents:
diff changeset
142 @echo Assembling $<
a61af66fc99e Initial load
duke
parents:
diff changeset
143 $(QUIETLY) $(REMOVE_TARGET)
a61af66fc99e Initial load
duke
parents:
diff changeset
144 $(QUIETLY) $(AS.S) -o $@ $< $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
145
a61af66fc99e Initial load
duke
parents:
diff changeset
146 %.s: %.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
147 @echo Generating assembly for $<
a61af66fc99e Initial load
duke
parents:
diff changeset
148 $(QUIETLY) $(GENASM.CC) -o $@ $<
a61af66fc99e Initial load
duke
parents:
diff changeset
149 $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
150
a61af66fc99e Initial load
duke
parents:
diff changeset
151 # Intermediate files (for debugging macros)
a61af66fc99e Initial load
duke
parents:
diff changeset
152 %.i: %.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
153 @echo Preprocessing $< to $@
a61af66fc99e Initial load
duke
parents:
diff changeset
154 $(QUIETLY) $(PREPROCESS.CC) $< > $@ $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
155
a61af66fc99e Initial load
duke
parents:
diff changeset
156 # Override gnumake built-in rules which do sccs get operations badly.
a61af66fc99e Initial load
duke
parents:
diff changeset
157 # (They put the checked out code in the current directory, not in the
a61af66fc99e Initial load
duke
parents:
diff changeset
158 # directory of the original file.) Since this is a symptom of a teamware
a61af66fc99e Initial load
duke
parents:
diff changeset
159 # failure, and since not all problems can be detected by gnumake due
a61af66fc99e Initial load
duke
parents:
diff changeset
160 # to incomplete dependency checking... just complain and stop.
a61af66fc99e Initial load
duke
parents:
diff changeset
161 %:: s.%
a61af66fc99e Initial load
duke
parents:
diff changeset
162 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
163 @echo File $@
a61af66fc99e Initial load
duke
parents:
diff changeset
164 @echo is out of date with respect to its SCCS file.
a61af66fc99e Initial load
duke
parents:
diff changeset
165 @echo This file may be from an unresolved Teamware conflict.
a61af66fc99e Initial load
duke
parents:
diff changeset
166 @echo This is also a symptom of a Teamware bringover/putback failure
a61af66fc99e Initial load
duke
parents:
diff changeset
167 @echo in which SCCS files are updated but not checked out.
a61af66fc99e Initial load
duke
parents:
diff changeset
168 @echo Check for other out of date files in your workspace.
a61af66fc99e Initial load
duke
parents:
diff changeset
169 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
170 @exit 666
a61af66fc99e Initial load
duke
parents:
diff changeset
171
a61af66fc99e Initial load
duke
parents:
diff changeset
172 %:: SCCS/s.%
a61af66fc99e Initial load
duke
parents:
diff changeset
173 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
174 @echo File $@
a61af66fc99e Initial load
duke
parents:
diff changeset
175 @echo is out of date with respect to its SCCS file.
a61af66fc99e Initial load
duke
parents:
diff changeset
176 @echo This file may be from an unresolved Teamware conflict.
a61af66fc99e Initial load
duke
parents:
diff changeset
177 @echo This is also a symptom of a Teamware bringover/putback failure
a61af66fc99e Initial load
duke
parents:
diff changeset
178 @echo in which SCCS files are updated but not checked out.
a61af66fc99e Initial load
duke
parents:
diff changeset
179 @echo Check for other out of date files in your workspace.
a61af66fc99e Initial load
duke
parents:
diff changeset
180 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
181 @exit 666
a61af66fc99e Initial load
duke
parents:
diff changeset
182
a61af66fc99e Initial load
duke
parents:
diff changeset
183 .PHONY: default