diff agent/make/Makefile @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children c70a245cad3a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/agent/make/Makefile	Sat Dec 01 00:00:00 2007 +0000
@@ -0,0 +1,312 @@
+#
+# Copyright 2000-2007 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#  
+#
+
+# This guards against adding broken .java files to the directory
+# hierarchy, but may be a pain to keep in sync
+
+# Generated using the build-pkglist script
+ifeq "x$(GAMMADIR)" "x"
+include ../../make/defs.make
+else
+include $(GAMMADIR)/make/defs.make
+endif
+
+PKGLIST = \
+sun.jvm.hotspot \
+sun.jvm.hotspot.asm \
+sun.jvm.hotspot.asm.amd64 \
+sun.jvm.hotspot.asm.ia64 \
+sun.jvm.hotspot.asm.sparc \
+sun.jvm.hotspot.asm.x86 \
+sun.jvm.hotspot.bugspot \
+sun.jvm.hotspot.bugspot.tree \
+sun.jvm.hotspot.c1 \
+sun.jvm.hotspot.code \
+sun.jvm.hotspot.compiler \
+sun.jvm.hotspot.debugger \
+sun.jvm.hotspot.debugger.amd64 \
+sun.jvm.hotspot.debugger.cdbg \
+sun.jvm.hotspot.debugger.cdbg.basic \
+sun.jvm.hotspot.debugger.cdbg.basic.amd64 \
+sun.jvm.hotspot.debugger.cdbg.basic.x86 \
+sun.jvm.hotspot.debugger.dbx \
+sun.jvm.hotspot.debugger.dbx.sparc \
+sun.jvm.hotspot.debugger.dbx.x86 \
+sun.jvm.hotspot.debugger.dummy \
+sun.jvm.hotspot.debugger.ia64 \
+sun.jvm.hotspot.debugger.linux \
+sun.jvm.hotspot.debugger.linux.amd64 \
+sun.jvm.hotspot.debugger.linux.ia64 \
+sun.jvm.hotspot.debugger.linux.x86 \
+sun.jvm.hotspot.debugger.posix \
+sun.jvm.hotspot.debugger.posix.elf \
+sun.jvm.hotspot.debugger.proc \
+sun.jvm.hotspot.debugger.proc.amd64 \
+sun.jvm.hotspot.debugger.proc.sparc \
+sun.jvm.hotspot.debugger.proc.x86 \
+sun.jvm.hotspot.debugger.remote \
+sun.jvm.hotspot.debugger.remote.amd64 \
+sun.jvm.hotspot.debugger.remote.sparc \
+sun.jvm.hotspot.debugger.remote.x86 \
+sun.jvm.hotspot.debugger.sparc \
+sun.jvm.hotspot.debugger.win32 \
+sun.jvm.hotspot.debugger.win32.coff \
+sun.jvm.hotspot.debugger.windbg \
+sun.jvm.hotspot.debugger.windbg.amd64 \
+sun.jvm.hotspot.debugger.windbg.ia64 \
+sun.jvm.hotspot.debugger.windbg.x86 \
+sun.jvm.hotspot.debugger.x86 \
+sun.jvm.hotspot.gc_implementation \
+sun.jvm.hotspot.gc_implementation.parallelScavenge \
+sun.jvm.hotspot.gc_implementation.shared \
+sun.jvm.hotspot.gc_interface \
+sun.jvm.hotspot.interpreter \
+sun.jvm.hotspot.jdi \
+sun.jvm.hotspot.livejvm \
+sun.jvm.hotspot.memory \
+sun.jvm.hotspot.oops \
+sun.jvm.hotspot.runtime \
+sun.jvm.hotspot.runtime.amd64 \
+sun.jvm.hotspot.runtime.ia64 \
+sun.jvm.hotspot.runtime.linux \
+sun.jvm.hotspot.runtime.linux_amd64 \
+sun.jvm.hotspot.runtime.linux_ia64 \
+sun.jvm.hotspot.runtime.linux_sparc \
+sun.jvm.hotspot.runtime.linux_x86 \
+sun.jvm.hotspot.runtime.posix \
+sun.jvm.hotspot.runtime.solaris_amd64 \
+sun.jvm.hotspot.runtime.solaris_sparc \
+sun.jvm.hotspot.runtime.solaris_x86 \
+sun.jvm.hotspot.runtime.sparc \
+sun.jvm.hotspot.runtime.win32_amd64 \
+sun.jvm.hotspot.runtime.win32_ia64 \
+sun.jvm.hotspot.runtime.win32_x86 \
+sun.jvm.hotspot.runtime.x86 \
+sun.jvm.hotspot.tools \
+sun.jvm.hotspot.tools.jcore \
+sun.jvm.hotspot.tools.soql \
+sun.jvm.hotspot.types \
+sun.jvm.hotspot.types.basic \
+sun.jvm.hotspot.ui \
+sun.jvm.hotspot.ui.action \
+sun.jvm.hotspot.ui.classbrowser \
+sun.jvm.hotspot.ui.resources \
+sun.jvm.hotspot.ui.table \
+sun.jvm.hotspot.ui.tree \
+sun.jvm.hotspot.ui.treetable \
+sun.jvm.hotspot.utilities \
+sun.jvm.hotspot.utilities.memo \
+sun.jvm.hotspot.utilities.soql
+#END PKGLIST
+
+# Generated using the build-filelist script
+FILELIST = \
+sun/jvm/hotspot/*.java \
+sun/jvm/hotspot/asm/*.java \
+sun/jvm/hotspot/asm/amd64/*.java \
+sun/jvm/hotspot/asm/ia64/*.java \
+sun/jvm/hotspot/asm/sparc/*.java \
+sun/jvm/hotspot/asm/x86/*.java \
+sun/jvm/hotspot/bugspot/*.java \
+sun/jvm/hotspot/bugspot/tree/*.java \
+sun/jvm/hotspot/c1/*.java \
+sun/jvm/hotspot/code/*.java \
+sun/jvm/hotspot/compiler/*.java \
+sun/jvm/hotspot/debugger/*.java \
+sun/jvm/hotspot/debugger/amd64/*.java \
+sun/jvm/hotspot/debugger/cdbg/*.java \
+sun/jvm/hotspot/debugger/cdbg/basic/*.java \
+sun/jvm/hotspot/debugger/cdbg/basic/amd64/*.java \
+sun/jvm/hotspot/debugger/cdbg/basic/x86/*.java \
+sun/jvm/hotspot/debugger/dbx/*.java \
+sun/jvm/hotspot/debugger/dbx/sparc/*.java \
+sun/jvm/hotspot/debugger/dbx/x86/*.java \
+sun/jvm/hotspot/debugger/dummy/*.java \
+sun/jvm/hotspot/debugger/ia64/*.java \
+sun/jvm/hotspot/debugger/linux/*.java \
+sun/jvm/hotspot/debugger/linux/x86/*.java \
+sun/jvm/hotspot/debugger/posix/*.java \
+sun/jvm/hotspot/debugger/posix/elf/*.java \
+sun/jvm/hotspot/debugger/proc/*.java \
+sun/jvm/hotspot/debugger/proc/amd64/*.java \
+sun/jvm/hotspot/debugger/proc/sparc/*.java \
+sun/jvm/hotspot/debugger/proc/x86/*.java \
+sun/jvm/hotspot/debugger/remote/*.java \
+sun/jvm/hotspot/debugger/remote/amd64/*.java \
+sun/jvm/hotspot/debugger/remote/sparc/*.java \
+sun/jvm/hotspot/debugger/remote/x86/*.java \
+sun/jvm/hotspot/debugger/sparc/*.java \
+sun/jvm/hotspot/debugger/win32/*.java \
+sun/jvm/hotspot/debugger/win32/coff/*.java \
+sun/jvm/hotspot/debugger/windbg/*.java \
+sun/jvm/hotspot/debugger/windbg/ia64/*.java \
+sun/jvm/hotspot/debugger/windbg/x86/*.java \
+sun/jvm/hotspot/debugger/x86/*.java \
+sun/jvm/hotspot/interpreter/*.java \
+sun/jvm/hotspot/jdi/*.java \
+sun/jvm/hotspot/livejvm/*.java \
+sun/jvm/hotspot/memory/*.java \
+sun/jvm/hotspot/oops/*.java \
+sun/jvm/hotspot/runtime/*.java \
+sun/jvm/hotspot/runtime/amd64/*.java \
+sun/jvm/hotspot/runtime/ia64/*.java \
+sun/jvm/hotspot/runtime/linux/*.java \
+sun/jvm/hotspot/runtime/linux_amd64/*.java \
+sun/jvm/hotspot/runtime/linux_ia64/*.java \
+sun/jvm/hotspot/runtime/linux_sparc/*.java \
+sun/jvm/hotspot/runtime/linux_x86/*.java \
+sun/jvm/hotspot/runtime/posix/*.java \
+sun/jvm/hotspot/runtime/solaris_amd64/*.java \
+sun/jvm/hotspot/runtime/solaris_sparc/*.java \
+sun/jvm/hotspot/runtime/solaris_x86/*.java \
+sun/jvm/hotspot/runtime/sparc/*.java \
+sun/jvm/hotspot/runtime/win32_amd64/*.java \
+sun/jvm/hotspot/runtime/win32_ia64/*.java \
+sun/jvm/hotspot/runtime/win32_x86/*.java \
+sun/jvm/hotspot/runtime/x86/*.java \
+sun/jvm/hotspot/tools/*.java \
+sun/jvm/hotspot/tools/jcore/*.java \
+sun/jvm/hotspot/tools/soql/*.java \
+sun/jvm/hotspot/types/*.java \
+sun/jvm/hotspot/types/basic/*.java \
+sun/jvm/hotspot/ui/*.java \
+sun/jvm/hotspot/ui/action/*.java \
+sun/jvm/hotspot/ui/classbrowser/*.java \
+sun/jvm/hotspot/ui/table/*.java \
+sun/jvm/hotspot/ui/tree/*.java \
+sun/jvm/hotspot/ui/treetable/*.java \
+sun/jvm/hotspot/utilities/*.java \
+sun/jvm/hotspot/utilities/memo/*.java \
+sun/jvm/hotspot/utilities/soql/*.java 
+#END FILELIST
+
+ifneq "x$(ALT_BOOTDIR)" "x"
+  BOOTDIR := $(ALT_BOOTDIR)
+endif
+
+ifeq "x$(BOOTDIR)" "x"
+  JDK_HOME := $(shell dirname $(shell which java))/..
+else
+  JDK_HOME := $(BOOTDIR)
+endif
+
+isUnix := $(shell test -r c:/; echo $$?)
+
+ifeq "$(isUnix)" "1"
+    CPS := :
+else
+    CPS := ";"
+endif
+
+SRC_DIR    = ../src/share/classes
+LIB_DIR    = ../src/share/lib
+CLOSED_LIB_DIR    = ../closed/src/share/lib
+BUILD_DIR  = ../build
+OUTPUT_DIR = $(BUILD_DIR)/classes
+DOC_DIR    = $(BUILD_DIR)/doc
+
+# gnumake 3.78.1 does not accept the *s, 
+# so use the shell to expand them
+ALLFILES := $(patsubst %,$(SRC_DIR)/%,$(FILELIST))
+ALLFILES := $(shell /bin/ls $(ALLFILES))
+
+
+# tools.jar is needed by the JDI - SA binding
+CLASSPATH = $(LIB_DIR)/maf-1_0.jar$(CPS)$(JDK_HOME)/lib/tools.jar
+CLASSPATH := $(subst \,/,$(CLASSPATH))
+
+# FIXME: autogenerate call to rmic
+
+SA_BUILD_VERSION_PROP = "sun.jvm.hotspot.runtime.VM.saBuildVersion=$(SA_BUILD_VERSION)"
+
+SA_PROPERTIES = $(OUTPUT_DIR)/sa.properties
+
+# Tagging it on because there's no reason not to run it
+all: filelist
+	@mkdir -p $(OUTPUT_DIR)
+	@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
+	@javac -source 1.4 -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
+	@rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
+	rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
+	cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
+
+allprof: filelist
+	@mkdir -p $(OUTPUT_DIR)
+	@echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
+	@javac -source 1.4 -J-Xprof -classpath $(CLASSPATH) -deprecation -sourcepath $(SRC_DIR) -g -d $(OUTPUT_DIR) @filelist
+	@rmic -classpath $(OUTPUT_DIR) -d $(OUTPUT_DIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
+	rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql/sa.js
+	cp $(SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(OUTPUT_DIR)/sun/jvm/hotspot/utilities/soql
+
+filelist: $(ALLFILES)
+	@if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \
+          echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA."; \
+          echo ""; \
+          exit 1; \
+        fi
+	@rm -f $@
+	@echo $(ALLFILES) > $@
+
+.PHONY: natives
+natives:
+	cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) all
+
+.PHONY: sa-jdi.jar
+sa-jdi.jar:
+	if [ ! -f $(JDK_HOME)/lib/tools.jar ] ; then \
+          echo "Missing $(JDK_HOME)/lib/tools.jar file. Use 1.6.0 or later version jdk to build SA.";\
+          exit 1; \
+        fi
+	rm -f $(BUILD_DIR)/sa-jdi.jar
+	rm -f $(OUTPUT_DIR)/jdi_class_files
+	javac -source 1.4 ClosureFinder.java -d $(OUTPUT_DIR)
+	cd $(OUTPUT_DIR) ; find sun/jvm/hotspot/jdi -name "*.class" > jdi_class_files
+	cd $(OUTPUT_DIR) ; jar cvf ../sa-jdi.jar `java ClosureFinder jdi_class_files .`
+	cd $(BUILD_DIR) ; jar uvf sa-jdi.jar -C $(SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
+	cd $(BUILD_DIR) ; jar uvf sa-jdi.jar -C $(OUTPUT_DIR) sa.properties
+	rm -f $(OUTPUT_DIR)/ClosureFinder.class
+	rm -f $(OUTPUT_DIR)/jdi_class_files
+
+docs:
+	@javadoc -private -classpath $(CLASSPATH) -sourcepath $(SRC_DIR) -d $(DOC_DIR) $(PKGLIST)
+
+sizes: $(ALLFILES)
+	wc -l $(ALLFILES)
+
+cscope: $(ALLFILES)
+	echo $(ALLFILES) > java.files
+	cscope -b -i java.files -f java.out 
+
+.PHONY: sa.jar
+sa.jar:
+	rm -f $(BUILD_DIR)/sa.jar
+	mkdir -p $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources
+	rm -f $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/*
+	cp $(SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(OUTPUT_DIR)/sun/jvm/hotspot/ui/resources/
+	cd $(OUTPUT_DIR) ; jar cvf ../sa.jar *
+
+clean::
+	rm -rf filelist
+	cd ../src/os/`java -classpath $(OUTPUT_DIR) sun.jvm.hotspot.utilities.PlatformInfo`; $(MAKE) clean
+	rm -rf $(BUILD_DIR)/*