Mercurial > hg > truffle
comparison make/solaris/makefiles/vm.make @ 1972:f95d63e2154a
6989984: Use standard include model for Hospot
Summary: Replaced MakeDeps and the includeDB files with more standardized solutions.
Reviewed-by: coleenp, kvn, kamg
author | stefank |
---|---|
date | Tue, 23 Nov 2010 13:22:55 -0800 |
parents | c18cbe5936b8 |
children | 2968675b413e 2d4762ec74af |
comparison
equal
deleted
inserted
replaced
1971:e33f46fc48ed | 1972:f95d63e2154a |
---|---|
1 # | 1 # |
2 # Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 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 | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
33 | 33 |
34 #---------------------------------------------------------------------- | 34 #---------------------------------------------------------------------- |
35 # Defs | 35 # Defs |
36 | 36 |
37 GENERATED = ../generated | 37 GENERATED = ../generated |
38 | 38 DEP_DIR = $(GENERATED)/dependencies |
39 # read a generated file defining the set of .o's and the .o .h dependencies | 39 |
40 include $(GENERATED)/Dependencies | 40 # reads the generated files defining the set of .o's and the .o .h dependencies |
41 -include $(DEP_DIR)/*.d | |
41 | 42 |
42 # read machine-specific adjustments (%%% should do this via buildtree.make?) | 43 # read machine-specific adjustments (%%% should do this via buildtree.make?) |
43 include $(MAKEFILES_DIR)/$(BUILDARCH).make | 44 include $(MAKEFILES_DIR)/$(BUILDARCH).make |
44 | 45 |
45 # set VPATH so make knows where to look for source files | 46 # set VPATH so make knows where to look for source files |
46 # Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm | 47 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm |
47 # The incls directory contains generated header file lists for inclusion. | |
48 # The adfiles directory contains ad_<arch>.[ch]pp. | 48 # The adfiles directory contains ad_<arch>.[ch]pp. |
49 # The jvmtifiles directory contains jvmti*.[ch]pp | 49 # The jvmtifiles directory contains jvmti*.[ch]pp |
50 Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls | 50 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles |
51 VPATH += $(Src_Dirs_V:%=%:) | 51 VPATH += $(Src_Dirs_V:%=%:) |
52 | 52 |
53 # set INCLUDES for C preprocessor | 53 # set INCLUDES for C preprocessor |
54 Src_Dirs_I = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED) | 54 Src_Dirs_I += $(GENERATED) |
55 INCLUDES += $(Src_Dirs_I:%=-I%) | 55 INCLUDES += $(Src_Dirs_I:%=-I%) |
56 | 56 |
57 ifeq (${VERSION}, debug) | 57 ifeq (${VERSION}, debug) |
58 SYMFLAG = -g | 58 SYMFLAG = -g |
59 else | 59 else |
132 # JVM | 132 # JVM |
133 | 133 |
134 JVM = jvm | 134 JVM = jvm |
135 LIBJVM = lib$(JVM).so | 135 LIBJVM = lib$(JVM).so |
136 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so | 136 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so |
137 | |
138 CORE_PATHS := $(shell find $(GAMMADIR)/src/share/vm/* -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)) | |
139 CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm | |
140 CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm | |
141 CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm | |
142 CORE_PATHS += $(GENERATED)/jvmtifiles | |
143 | |
144 COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1 | |
145 | |
146 COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto | |
147 COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt | |
148 COMPILER2_PATHS += $(GENERATED)/adfiles | |
149 | |
150 # Include dirs per type. | |
151 Src_Dirs/CORE := $(CORE_PATHS) | |
152 Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) | |
153 Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS) | |
154 Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) | |
155 Src_Dirs/ZERO := $(CORE_PATHS) | |
156 Src_Dirs/SHARK := $(CORE_PATHS) | |
157 Src_Dirs := $(Src_Dirs/$(TYPE)) | |
158 | |
159 COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\* | |
160 COMPILER1_SPECIFIC_FILES := c1_\* | |
161 SHARK_SPECIFIC_FILES := shark | |
162 ZERO_SPECIFIC_FILES := zero | |
163 | |
164 # Always exclude these. | |
165 Src_Files_EXCLUDE := dtrace jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp | |
166 | |
167 # Exclude per type. | |
168 Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
169 Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
170 Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) | |
171 Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) | |
172 Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
173 Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) | |
174 | |
175 Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE)) | |
176 | |
177 # Special handling of arch model. | |
178 ifeq ($(Platform_arch_model), x86_32) | |
179 Src_Files_EXCLUDE += \*x86_64\* | |
180 endif | |
181 ifeq ($(Platform_arch_model), x86_64) | |
182 Src_Files_EXCLUDE += \*x86_32\* | |
183 endif | |
184 | |
185 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. | |
186 define findsrc | |
187 $(notdir $(shell find $(1) \( -name \*.c -o -name \*.cpp -o -name \*.s \) -a \! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \) )) | |
188 endef | |
189 | |
190 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) | |
191 | |
192 Obj_Files = $(addsuffix .o,$(basename $(Src_Files))) | |
137 | 193 |
138 JVM_OBJ_FILES = $(Obj_Files) $(DTRACE_OBJS) | 194 JVM_OBJ_FILES = $(Obj_Files) $(DTRACE_OBJS) |
139 | 195 |
140 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES)) | 196 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES)) |
141 | 197 |
203 # Serviceability agent | 259 # Serviceability agent |
204 include $(MAKEFILES_DIR)/saproc.make | 260 include $(MAKEFILES_DIR)/saproc.make |
205 | 261 |
206 #---------------------------------------------------------------------- | 262 #---------------------------------------------------------------------- |
207 | 263 |
208 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) checkAndBuildSA dtraceCheck | 264 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(LIBJVM_DTRACE) $(BUILDLIBSAPROC) dtraceCheck |
209 | 265 |
210 install: install_jvm install_jsig install_saproc | 266 install: install_jvm install_jsig install_saproc |
211 | 267 |
212 .PHONY: default build install install_jvm | 268 .PHONY: default build install install_jvm |