source: trunk/openjdk/hotspot/agent/make/Makefile

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: 10.6 KB
Line 
1#
2# Copyright (c) 2000, 2008, 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.
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#
19# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20# or visit www.oracle.com if you need additional information or have any
21# questions.
22#
23#
24
25# This guards against adding broken .java files to the directory
26# hierarchy, but may be a pain to keep in sync
27
28# Generated using the build-pkglist script
29ifeq "x$(GAMMADIR)" "x"
30include ../../make/defs.make
31else
32include $(GAMMADIR)/make/defs.make
33endif
34
35ifeq "x$(HOTSPOT_BUILD_VERSION)" "x"
36SA_BUILD_VERSION=$(HOTSPOT_RELEASE_VERSION)
37else
38SA_BUILD_VERSION=$(HOTSPOT_RELEASE_VERSION)-$(HOTSPOT_BUILD_VERSION)
39endif
40
41PKGLIST = \
42sun.jvm.hotspot \
43sun.jvm.hotspot.asm \
44sun.jvm.hotspot.asm.amd64 \
45sun.jvm.hotspot.asm.ia64 \
46sun.jvm.hotspot.asm.sparc \
47sun.jvm.hotspot.asm.x86 \
48sun.jvm.hotspot.bugspot \
49sun.jvm.hotspot.bugspot.tree \
50sun.jvm.hotspot.c1 \
51sun.jvm.hotspot.code \
52sun.jvm.hotspot.compiler \
53sun.jvm.hotspot.debugger \
54sun.jvm.hotspot.debugger.amd64 \
55sun.jvm.hotspot.debugger.cdbg \
56sun.jvm.hotspot.debugger.cdbg.basic \
57sun.jvm.hotspot.debugger.cdbg.basic.amd64 \
58sun.jvm.hotspot.debugger.cdbg.basic.x86 \
59sun.jvm.hotspot.debugger.dbx \
60sun.jvm.hotspot.debugger.dbx.sparc \
61sun.jvm.hotspot.debugger.dbx.x86 \
62sun.jvm.hotspot.debugger.dummy \
63sun.jvm.hotspot.debugger.ia64 \
64sun.jvm.hotspot.debugger.linux \
65sun.jvm.hotspot.debugger.linux.amd64 \
66sun.jvm.hotspot.debugger.linux.ia64 \
67sun.jvm.hotspot.debugger.linux.x86 \
68sun.jvm.hotspot.debugger.posix \
69sun.jvm.hotspot.debugger.posix.elf \
70sun.jvm.hotspot.debugger.proc \
71sun.jvm.hotspot.debugger.proc.amd64 \
72sun.jvm.hotspot.debugger.proc.sparc \
73sun.jvm.hotspot.debugger.proc.x86 \
74sun.jvm.hotspot.debugger.remote \
75sun.jvm.hotspot.debugger.remote.amd64 \
76sun.jvm.hotspot.debugger.remote.sparc \
77sun.jvm.hotspot.debugger.remote.x86 \
78sun.jvm.hotspot.debugger.sparc \
79sun.jvm.hotspot.debugger.win32 \
80sun.jvm.hotspot.debugger.win32.coff \
81sun.jvm.hotspot.debugger.windbg \
82sun.jvm.hotspot.debugger.windbg.amd64 \
83sun.jvm.hotspot.debugger.windbg.ia64 \
84sun.jvm.hotspot.debugger.windbg.x86 \
85sun.jvm.hotspot.debugger.x86 \
86sun.jvm.hotspot.gc_implementation \
87sun.jvm.hotspot.gc_implementation.parallelScavenge \
88sun.jvm.hotspot.gc_implementation.shared \
89sun.jvm.hotspot.gc_interface \
90sun.jvm.hotspot.interpreter \
91sun.jvm.hotspot.jdi \
92sun.jvm.hotspot.livejvm \
93sun.jvm.hotspot.memory \
94sun.jvm.hotspot.oops \
95sun.jvm.hotspot.runtime \
96sun.jvm.hotspot.runtime.amd64 \
97sun.jvm.hotspot.runtime.ia64 \
98sun.jvm.hotspot.runtime.linux \
99sun.jvm.hotspot.runtime.linux_amd64 \
100sun.jvm.hotspot.runtime.linux_ia64 \
101sun.jvm.hotspot.runtime.linux_sparc \
102sun.jvm.hotspot.runtime.linux_x86 \
103sun.jvm.hotspot.runtime.posix \
104sun.jvm.hotspot.runtime.solaris_amd64 \
105sun.jvm.hotspot.runtime.solaris_sparc \
106sun.jvm.hotspot.runtime.solaris_x86 \
107sun.jvm.hotspot.runtime.sparc \
108sun.jvm.hotspot.runtime.win32_amd64 \
109sun.jvm.hotspot.runtime.win32_ia64 \
110sun.jvm.hotspot.runtime.win32_x86 \
111sun.jvm.hotspot.runtime.x86 \
112sun.jvm.hotspot.tools \
113sun.jvm.hotspot.tools.jcore \
114sun.jvm.hotspot.tools.soql \
115sun.jvm.hotspot.types \
116sun.jvm.hotspot.types.basic \
117sun.jvm.hotspot.ui \
118sun.jvm.hotspot.ui.action \
119sun.jvm.hotspot.ui.classbrowser \
120sun.jvm.hotspot.ui.resources \
121sun.jvm.hotspot.ui.table \
122sun.jvm.hotspot.ui.tree \
123sun.jvm.hotspot.ui.treetable \
124sun.jvm.hotspot.utilities \
125sun.jvm.hotspot.utilities.memo \
126sun.jvm.hotspot.utilities.soql \
127com.sun.java.swing.action \
128com.sun.java.swing.ui
129#END PKGLIST
130
131# Generated using the build-filelist script
132FILELIST = \
133sun/jvm/hotspot/*.java \
134sun/jvm/hotspot/asm/*.java \
135sun/jvm/hotspot/asm/amd64/*.java \
136sun/jvm/hotspot/asm/ia64/*.java \
137sun/jvm/hotspot/asm/sparc/*.java \
138sun/jvm/hotspot/asm/x86/*.java \
139sun/jvm/hotspot/bugspot/*.java \
140sun/jvm/hotspot/bugspot/tree/*.java \
141sun/jvm/hotspot/c1/*.java \
142sun/jvm/hotspot/code/*.java \
143sun/jvm/hotspot/compiler/*.java \
144sun/jvm/hotspot/debugger/*.java \
145sun/jvm/hotspot/debugger/amd64/*.java \
146sun/jvm/hotspot/debugger/cdbg/*.java \
147sun/jvm/hotspot/debugger/cdbg/basic/*.java \
148sun/jvm/hotspot/debugger/cdbg/basic/amd64/*.java \
149sun/jvm/hotspot/debugger/cdbg/basic/x86/*.java \
150sun/jvm/hotspot/debugger/dbx/*.java \
151sun/jvm/hotspot/debugger/dbx/sparc/*.java \
152sun/jvm/hotspot/debugger/dbx/x86/*.java \
153sun/jvm/hotspot/debugger/dummy/*.java \
154sun/jvm/hotspot/debugger/ia64/*.java \
155sun/jvm/hotspot/debugger/linux/*.java \
156sun/jvm/hotspot/debugger/linux/x86/*.java \
157sun/jvm/hotspot/debugger/posix/*.java \
158sun/jvm/hotspot/debugger/posix/elf/*.java \
159sun/jvm/hotspot/debugger/proc/*.java \
160sun/jvm/hotspot/debugger/proc/amd64/*.java \
161sun/jvm/hotspot/debugger/proc/sparc/*.java \
162sun/jvm/hotspot/debugger/proc/x86/*.java \
163sun/jvm/hotspot/debugger/remote/*.java \
164sun/jvm/hotspot/debugger/remote/amd64/*.java \
165sun/jvm/hotspot/debugger/remote/sparc/*.java \
166sun/jvm/hotspot/debugger/remote/x86/*.java \
167sun/jvm/hotspot/debugger/sparc/*.java \
168sun/jvm/hotspot/debugger/win32/*.java \
169sun/jvm/hotspot/debugger/win32/coff/*.java \
170sun/jvm/hotspot/debugger/windbg/*.java \
171sun/jvm/hotspot/debugger/windbg/ia64/*.java \
172sun/jvm/hotspot/debugger/windbg/x86/*.java \
173sun/jvm/hotspot/debugger/x86/*.java \
174sun/jvm/hotspot/interpreter/*.java \
175sun/jvm/hotspot/jdi/*.java \
176sun/jvm/hotspot/livejvm/*.java \
177sun/jvm/hotspot/memory/*.java \
178sun/jvm/hotspot/oops/*.java \
179sun/jvm/hotspot/runtime/*.java \
180sun/jvm/hotspot/runtime/amd64/*.java \
181sun/jvm/hotspot/runtime/ia64/*.java \
182sun/jvm/hotspot/runtime/linux/*.java \
183sun/jvm/hotspot/runtime/linux_amd64/*.java \
184sun/jvm/hotspot/runtime/linux_ia64/*.java \
185sun/jvm/hotspot/runtime/linux_sparc/*.java \
186sun/jvm/hotspot/runtime/linux_x86/*.java \
187sun/jvm/hotspot/runtime/posix/*.java \
188sun/jvm/hotspot/runtime/solaris_amd64/*.java \
189sun/jvm/hotspot/runtime/solaris_sparc/*.java \
190sun/jvm/hotspot/runtime/solaris_x86/*.java \
191sun/jvm/hotspot/runtime/sparc/*.java \
192sun/jvm/hotspot/runtime/win32_amd64/*.java \
193sun/jvm/hotspot/runtime/win32_ia64/*.java \
194sun/jvm/hotspot/runtime/win32_x86/*.java \
195sun/jvm/hotspot/runtime/x86/*.java \
196sun/jvm/hotspot/tools/*.java \
197sun/jvm/hotspot/tools/jcore/*.java \
198sun/jvm/hotspot/tools/soql/*.java \
199sun/jvm/hotspot/types/*.java \
200sun/jvm/hotspot/types/basic/*.java \
201sun/jvm/hotspot/ui/*.java \
202sun/jvm/hotspot/ui/action/*.java \
203sun/jvm/hotspot/ui/classbrowser/*.java \
204sun/jvm/hotspot/ui/table/*.java \
205sun/jvm/hotspot/ui/tree/*.java \
206sun/jvm/hotspot/ui/treetable/*.java \
207sun/jvm/hotspot/utilities/*.java \
208sun/jvm/hotspot/utilities/memo/*.java \
209sun/jvm/hotspot/utilities/soql/*.java \
210com/sun/java/swing/action/*.java \
211com/sun/java/swing/ui/*.java
212#END FILELIST
213
214ifneq "x$(ALT_BOOTDIR)" "x"
215 BOOTDIR := $(ALT_BOOTDIR)
216endif
217
218ifeq "x$(BOOTDIR)" "x"
219 JDK_HOME := $(shell dirname $(shell which java))/..
220else
221 JDK_HOME := $(BOOTDIR)
222endif
223
224isUnix := $(shell test -r c:/; echo $$?)
225
226ifeq "$(isUnix)" "1"
227 CPS := :
228else
229 CPS := ";"
230endif
231
232SRC_DIR = ../src/share/classes
233BUILD_DIR = ../build
234OUTPUT_DIR = $(BUILD_DIR)/classes
235DOC_DIR = $(BUILD_DIR)/doc
236
237# gnumake 3.78.1 does not accept the *s,
238# so use the shell to expand them
239ALLFILES := $(patsubst %,$(SRC_DIR)/%,$(FILELIST))
240ALLFILES := $(shell /bin/ls $(ALLFILES))
241
242# tools.jar is used by the sa-jdi binding
243CLASSPATH = $(JDK_HOME)/lib/tools.jar
244
245CLASSPATH := $(subst \,/,$(CLASSPATH))
246
247# FIXME: autogenerate call to rmic
248
249SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
250
251SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties
252JAVAC = $(JDK_HOME)/bin/javac
253JAVADOC = $(JDK_HOME)/bin/javadoc
254RMIC = $(JDK_HOME)/bin/rmic
255
256# Tagging it on because there's no reason not to run it
257all: filelist
258 @mkdir -p $(OUTPUT_DIR)
259 @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
260 $(JAVAC) -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
261 $(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
262 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
263 cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
264 mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
265 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
266 cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
267 cp -r $(SRC_DIR)/images/* $(OUTPUT_DIR)/
268
269allprof: filelist
270 @mkdir -p $(OUTPUT_DIR)
271 @echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
272 $(JAVAC) -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
273 $(RMIC) -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
274 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
275 cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
276 mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
277 rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
278 cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
279 cp -r $(SRC_DIR)/images/* $(OUTPUT_DIR)/
280
281.PHONY: filelist
282filelist: $(ALLFILES)
283 @if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \
284 echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA."; \
285 echo ""; \
286 exit 1; \
287 fi
288 @rm -f $@
289 @echo $(ALLFILES) > $@
290
291.PHONY: natives
292natives:
293 cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all
294
295.PHONY: sa-jdi.jar
296sa-jdi.jar:
297 echo "sa-jdi.jar is built by a hotspot build."
298
299docs:
300 @$(JAVADOC) -private -classpath $(CLASSPATH) -sourcepath $(SRC_DIR) -d $(DOC_DIR) $(PKGLIST)
301
302sizes: $(ALLFILES)
303 wc -l $(ALLFILES)
304
305cscope: $(ALLFILES)
306 rm -f java.files
307 echo $(ALLFILES) > java.files
308 cscope -b -i java.files -f java.out
309 rm -f java.files
310
311.PHONY: sa.jar
312sa.jar:
313 rm -f $(BUILD_DIR)/sa.jar
314 cd $(OUTPUT_DIR) ; jar cvf ../sa.jar *
315
316clean::
317 rm -rf filelist
318 cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean
319 rm -rf $(BUILD_DIR)/*
Note: See TracBrowser for help on using the repository browser.