--- old/make/solaris/makefiles/vm.make 2010-10-28 13:46:09.000000000 +0200 +++ new/make/solaris/makefiles/vm.make 2010-10-28 13:46:09.000000000 +0200 @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 2010, Oracle and/or its affiliates. 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 @@ -35,23 +35,23 @@ # Defs GENERATED = ../generated +DEP_DIR = $(GENERATED)/dependencies -# read a generated file defining the set of .o's and the .o .h dependencies -include $(GENERATED)/Dependencies +# reads the generated files defining the set of .o's and the .o .h dependencies +-include $(DEP_DIR)/*.d # read machine-specific adjustments (%%% should do this via buildtree.make?) include $(MAKEFILES_DIR)/$(BUILDARCH).make # set VPATH so make knows where to look for source files # Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm -# The incls directory contains generated header file lists for inclusion. # The adfiles directory contains ad_.[ch]pp. # The jvmtifiles directory contains jvmti*.[ch]pp -Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls +Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} VPATH += $(Src_Dirs_V:%=%:) # set INCLUDES for C preprocessor -Src_Dirs_I = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED) +Src_Dirs_I = $(PRECOMPILED_HEADER_DIR) $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GAMMADIR)/src/share/vm $(GENERATED) INCLUDES += $(Src_Dirs_I:%=-I%) ifeq (${VERSION}, debug) @@ -135,6 +135,71 @@ LIBJVM = lib$(JVM).so LIBJVM_G = lib$(JVM)$(G_SUFFIX).so +BASE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)) +BASE_PATHS += $(GAMMADIR)/src/share/vm/gc_implementation/shared +BASE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm +BASE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm +BASE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm +BASE_PATHS += $(GENERATED)/jvmtifiles + +CORE_PATHS := $(BASE_PATHS) +# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS. +CORE_PATHS += $(shell find $(GAMMADIR)/src/share/vm/gc_implementation/* -prune -type d \! -name shared) + +COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1 + +COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto +COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt +COMPILER2_PATHS += $(GENERATED)/adfiles + +# Include dirs per type. +Src_Dirs/CORE := $(CORE_PATHS) +Src_Dirs/KERNEL := $(BASE_PATHS) $(COMPILER1_PATHS) +Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) +Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS) +Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) +Src_Dirs/ZERO := $(CORE_PATHS) +Src_Dirs/SHARK := $(CORE_PATHS) +Src_Dirs := $(Src_Dirs/$(TYPE)) + +COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin c2_\* runtime_\* +COMPILER1_SPECIFIC_FILES := c1_\* +SHARK_SPECIFIC_FILES := shark +ZERO_SPECIFIC_FILES := zero + +# These files need to be excluded when building the kernel target. +KERNEL_EXCLUDED_FILES := attachListener.cpp attachListener_${Platform_os_family}.cpp dump.cpp dump_$(Platform_arch_model).cpp forte.cpp fprofiler.cpp heapDumper.cpp heapInspection.cpp jniCheck.cpp jvmtiCodeBlobEvents.cpp jvmtiExtensions.cpp jvmtiImpl.cpp jvmtiTagMap.cpp jvmtiTrace.cpp restore.cpp serialize.cpp vmStructs.cpp g1MemoryPool.cpp psMemoryPool.cpp gcAdaptivePolicyCounters.cpp concurrentGCThread.cpp mutableNUMASpace.cpp allocationStats.cpp gSpaceCounters.cpp immutableSpace.cpp mutableSpace.cpp spaceCounters.cpp yieldingWorkgroup.cpp + +# Always exclude these. +Src_Files_EXCLUDE := dtrace jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp + +# Exclude per type. +Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp +Src_Files_EXCLUDE/KERNEL := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) $(KERNEL_EXCLUDED_FILES) ciTypeFlow.cpp +Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp +Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) +Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) +Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp +Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) + +Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE)) + +# Special handling of arch model. +ifeq ($(Platform_arch_model), x86_32) +Src_Files_EXCLUDE += \*x86_64\* +endif +ifeq ($(Platform_arch_model), x86_64) +Src_Files_EXCLUDE += \*x86_32\* +endif + +define findsrc + $(notdir $(shell find $(1) \( -name \*.c -o -name \*.cpp -o -name \*.s \) -a \! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \) )) +endef + +Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) + +Obj_Files = $(addsuffix .o,$(basename $(Src_Files))) + JVM_OBJ_FILES = $(Obj_Files) $(DTRACE_OBJS) vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES))