hotspot/make/Makefile
changeset 4013 b154310845de
parent 670 ddf3e9583f2f
child 4733 27a7366e12da
--- a/hotspot/make/Makefile	Wed Oct 07 15:38:37 2009 -0700
+++ b/hotspot/make/Makefile	Tue Oct 13 12:04:21 2009 -0700
@@ -84,6 +84,7 @@
 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1
 C2_VM_TARGETS=product  fastdebug  optimized  jvmg
 KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel
+ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero
 
 # JDK directory list
 JDK_DIRS=bin include jre lib demo
@@ -94,6 +95,12 @@
 all_debug:     jvmg jvmg1 jvmgkernel docs export_debug
 all_optimized: optimized optimized1 optimizedkernel docs export_optimized
 
+allzero:           all_productzero all_fastdebugzero
+all_productzero:   productzero docs export_product
+all_fastdebugzero: fastdebugzero docs export_fastdebug
+all_debugzero:     jvmgzero docs export_debug
+all_optimizedzero: optimizedzero docs export_optimized
+
 # Do everything
 world:         all create_jdk
 
@@ -120,6 +127,10 @@
 	$(CD) $(GAMMADIR)/make; \
 	$(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT)
 
+$(ZERO_VM_TARGETS):
+	$(CD) $(GAMMADIR)/make; \
+	$(MAKE) VM_TARGET=$@ generic_buildzero $(ALT_OUT)
+
 # Build compiler1 (client) rule, different for platforms
 generic_build1:
 	$(MKDIR) -p $(OUTPUTDIR)
@@ -180,6 +191,12 @@
 	@$(ECHO) "No kernel ($(VM_TARGET)) for OS_NAME=$(OSNAME)"
 endif
 
+generic_buildzero:
+	$(MKDIR) -p $(OUTPUTDIR)
+	$(CD) $(OUTPUTDIR); \
+		$(MAKE) -f $(ABS_OS_MAKEFILE) \
+			$(MAKE_ARGS) $(VM_TARGET)
+
 # Export file rule
 generic_export: $(EXPORT_LIST)
 export_product:
@@ -210,11 +227,17 @@
 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
 C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
 KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel
+ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero
 C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR)
 C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR)
 KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR)
+ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR)
 
 # Misc files and generated files need to come from C1 or C2 area
+ifeq ($(ZERO_BUILD), true)
+  MISC_DIR=$(ZERO_DIR)
+  GEN_DIR=$(ZERO_BASE_DIR)/generated
+else
 ifeq ($(ARCH_DATA_MODEL), 32)
   MISC_DIR=$(C1_DIR)
   GEN_DIR=$(C1_BASE_DIR)/generated
@@ -222,6 +245,7 @@
   MISC_DIR=$(C2_DIR)
   GEN_DIR=$(C2_BASE_DIR)/generated
 endif
+endif
 
 # Bin files (windows)
 ifeq ($(OSNAME),windows)
@@ -265,6 +289,12 @@
 
 # Shared Library
 ifneq ($(OSNAME),windows)
+  ifeq ($(ZERO_BUILD), true)
+$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so
+	$(install-file)
+$(EXPORT_SERVER_DIR)/%.so:       $(ZERO_DIR)/%.so
+	$(install-file)
+  else
 $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so
 	$(install-file)
 $(EXPORT_CLIENT_DIR)/%.so:       $(C1_DIR)/%.so
@@ -275,6 +305,7 @@
 	$(install-file)
 $(EXPORT_SERVER_DIR)/64/%.so:    $(C2_DIR)/%.so
 	$(install-file)
+  endif
 endif
 
 # Jar file (sa-jdi.jar)
@@ -313,6 +344,7 @@
 	$(RM) -r $(C1_DIR)
 	$(RM) -r $(C2_DIR)
 	$(RM) -r $(KERNEL_DIR)
+	$(RM) -r $(ZERO_DIR)
 clean_export:
 	$(RM) -r $(EXPORT_PATH)
 clean_jdk:
@@ -335,8 +367,10 @@
 	 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -)
 
 test_jdk:
-  ifeq ($(ARCH_DATA_MODEL), 32)
+  ifneq ($(ZERO_BUILD), true)
+    ifeq ($(ARCH_DATA_MODEL), 32)
 	$(JDK_IMAGE_DIR)/bin/java -client -version
+    endif
   endif
 	$(JDK_IMAGE_DIR)/bin/java -server -version