52 |
52 |
53 # set VPATH so make knows where to look for source files |
53 # set VPATH so make knows where to look for source files |
54 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm |
54 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm |
55 # The adfiles directory contains ad_<arch>.[ch]pp. |
55 # The adfiles directory contains ad_<arch>.[ch]pp. |
56 # The jvmtifiles directory contains jvmti*.[ch]pp |
56 # The jvmtifiles directory contains jvmti*.[ch]pp |
57 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles $(GENERATED)/tracefiles |
57 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles $(GENERATED)/tracefiles $(GENERATED)/extensions |
58 VPATH += $(Src_Dirs_V:%=%:) |
58 VPATH += $(Src_Dirs_V:%=%:) |
59 |
59 |
60 # set INCLUDES for C preprocessor. |
60 # set INCLUDES for C preprocessor. |
61 Src_Dirs_I += $(GENERATED) |
61 Src_Dirs_I += $(GENERATED) |
62 # The order is important for the precompiled headers to work. |
62 # The order is important for the precompiled headers to work. |
159 CORE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \ |
159 CORE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \ |
160 find $(HS_ALT_SRC)/share/vm/jfr -type d; \ |
160 find $(HS_ALT_SRC)/share/vm/jfr -type d; \ |
161 fi) |
161 fi) |
162 endif |
162 endif |
163 |
163 |
|
164 CORE_PATHS+=$(GENERATED)/extensions |
|
165 |
164 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1) |
166 COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1) |
165 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1 |
167 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1 |
166 |
168 |
167 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto) |
169 COMPILER2_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/opto) |
168 COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt) |
170 COMPILER2_PATHS += $(call altsrc,$(HS_COMMON_SRC)/share/vm/libadt) |
205 endif |
207 endif |
206 ifeq ($(Platform_arch_model), x86_64) |
208 ifeq ($(Platform_arch_model), x86_64) |
207 Src_Files_EXCLUDE += \*x86_32\* |
209 Src_Files_EXCLUDE += \*x86_32\* |
208 endif |
210 endif |
209 |
211 |
|
212 Src_Files_BASE += \*.c \*.cpp \*.s |
|
213 |
210 # Alternate vm.make |
214 # Alternate vm.make |
211 # This has to be included here to allow changes to the source |
215 # This has to be included here to allow changes to the source |
212 # directories and excluded files before they are expanded |
216 # directories and excluded files before they are expanded |
213 # by the definition of Src_Files. |
217 # by the definition of Src_Files. |
214 -include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make |
218 -include $(HS_ALT_MAKE)/$(Platform_os_family)/makefiles/vm.make |
215 |
219 |
216 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. |
220 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. |
217 define findsrc |
221 define findsrc |
218 $(notdir $(shell find $(1)/. ! -name . -prune \ |
222 $(notdir $(shell find $(1)/. ! -name . -prune \ |
219 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ |
223 -a \( -name DUMMY $(addprefix -o -name ,$(Src_Files_BASE)) \) \ |
220 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \))) |
224 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \))) |
221 endef |
225 endef |
222 |
226 |
223 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) |
227 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) |
224 |
228 |
225 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files)))) |
229 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files))) $(EXTENDED_JVM_OBJ_FILES)) |
226 |
230 |
227 JVM_OBJ_FILES = $(Obj_Files) |
231 JVM_OBJ_FILES = $(Obj_Files) |
228 |
232 |
229 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES)) |
233 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES)) |
230 |
234 |
242 |
246 |
243 VMDEF_PAT = ^_ZTV |
247 VMDEF_PAT = ^_ZTV |
244 VMDEF_PAT := ^gHotSpotVM|$(VMDEF_PAT) |
248 VMDEF_PAT := ^gHotSpotVM|$(VMDEF_PAT) |
245 VMDEF_PAT := ^UseSharedSpaces$$|$(VMDEF_PAT) |
249 VMDEF_PAT := ^UseSharedSpaces$$|$(VMDEF_PAT) |
246 VMDEF_PAT := ^_ZN9Arguments17SharedArchivePathE$$|$(VMDEF_PAT) |
250 VMDEF_PAT := ^_ZN9Arguments17SharedArchivePathE$$|$(VMDEF_PAT) |
247 |
251 ifneq ($(VMDEF_PAT_EXT),) |
248 vm.def: $(Res_Files) $(Obj_Files) |
252 VMDEF_PAT := $(VMDEF_PAT_EXT)|$(VMDEF_PAT) |
|
253 endif |
|
254 |
|
255 vm.def: $(Res_Files) $(Obj_Files) $(VM_DEF_EXT) |
249 $(QUIETLY) $(NM) --defined-only $(Obj_Files) | sort -k3 -u | \ |
256 $(QUIETLY) $(NM) --defined-only $(Obj_Files) | sort -k3 -u | \ |
250 awk '$$3 ~ /$(VMDEF_PAT)/ { print "\t" $$3 ";" }' > $@ |
257 awk '$$3 ~ /$(VMDEF_PAT)/ { print "\t" $$3 ";" }' > $@ |
|
258 ifneq ($(VM_DEF_EXT),) |
|
259 cat $(VM_DEF_EXT) >> $@ |
|
260 endif |
251 |
261 |
252 mapfile_ext: |
262 mapfile_ext: |
253 rm -f $@ |
263 rm -f $@ |
254 touch $@ |
264 touch $@ |
255 if [ -f $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext ]; then \ |
265 if [ -f $(HS_ALT_MAKE)/linux/makefiles/mapfile-ext ]; then \ |