Mercurial > hg > truffle
comparison make/linux/makefiles/vm.make @ 2044:06f017f7daa7
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 07 Jan 2011 18:18:08 +0100 |
parents | 2d26b0046e0d e7ad5f6f4d29 |
children | 5d801e6b9a80 |
comparison
equal
deleted
inserted
replaced
1942:00bc9eaf0e24 | 2044:06f017f7daa7 |
---|---|
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 ifeq ($(ZERO_BUILD), true) | 44 ifeq ($(ZERO_BUILD), true) |
44 include $(MAKEFILES_DIR)/zeroshark.make | 45 include $(MAKEFILES_DIR)/zeroshark.make |
45 else | 46 else |
46 include $(MAKEFILES_DIR)/$(BUILDARCH).make | 47 include $(MAKEFILES_DIR)/$(BUILDARCH).make |
47 endif | 48 endif |
48 | 49 |
49 # set VPATH so make knows where to look for source files | 50 # set VPATH so make knows where to look for source files |
50 # Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm | 51 # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm |
51 # The incls directory contains generated header file lists for inclusion. | |
52 # The adfiles directory contains ad_<arch>.[ch]pp. | 52 # The adfiles directory contains ad_<arch>.[ch]pp. |
53 # The jvmtifiles directory contains jvmti*.[ch]pp | 53 # The jvmtifiles directory contains jvmti*.[ch]pp |
54 Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls | 54 Src_Dirs_V += $(GENERATED)/adfiles $(GENERATED)/jvmtifiles |
55 VPATH += $(Src_Dirs_V:%=%:) | 55 VPATH += $(Src_Dirs_V:%=%:) |
56 | 56 |
57 # set INCLUDES for C preprocessor | 57 # set INCLUDES for C preprocessor. |
58 Src_Dirs_I = $(PRECOMPILED_HEADER_DIR) $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED) | 58 Src_Dirs_I += $(GENERATED) |
59 INCLUDES += $(Src_Dirs_I:%=-I%) | 59 # The order is important for the precompiled headers to work. |
60 INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%) | |
60 | 61 |
61 ifeq (${VERSION}, debug) | 62 ifeq (${VERSION}, debug) |
62 SYMFLAG = -g | 63 SYMFLAG = -g |
63 else | 64 else |
64 SYMFLAG = | 65 SYMFLAG = |
116 | 117 |
117 JVM = jvm | 118 JVM = jvm |
118 LIBJVM = lib$(JVM).so | 119 LIBJVM = lib$(JVM).so |
119 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so | 120 LIBJVM_G = lib$(JVM)$(G_SUFFIX).so |
120 | 121 |
122 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 \)) | |
123 CORE_PATHS += $(GAMMADIR)/src/os/$(Platform_os_family)/vm | |
124 CORE_PATHS += $(GAMMADIR)/src/cpu/$(Platform_arch)/vm | |
125 CORE_PATHS += $(GAMMADIR)/src/os_cpu/$(Platform_os_arch)/vm | |
126 CORE_PATHS += $(GENERATED)/jvmtifiles | |
127 | |
128 COMPILER1_PATHS := $(GAMMADIR)/src/share/vm/c1 | |
129 | |
130 COMPILER2_PATHS := $(GAMMADIR)/src/share/vm/opto | |
131 COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt | |
132 COMPILER2_PATHS += $(GENERATED)/adfiles | |
133 | |
134 # Include dirs per type. | |
135 Src_Dirs/CORE := $(CORE_PATHS) | |
136 Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) | |
137 Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS) | |
138 Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) | |
139 Src_Dirs/ZERO := $(CORE_PATHS) | |
140 Src_Dirs/SHARK := $(CORE_PATHS) | |
141 Src_Dirs := $(Src_Dirs/$(TYPE)) | |
142 | |
143 COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\* | |
144 COMPILER1_SPECIFIC_FILES := c1_\* | |
145 SHARK_SPECIFIC_FILES := shark | |
146 ZERO_SPECIFIC_FILES := zero | |
147 | |
148 # Always exclude these. | |
149 Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp | |
150 | |
151 # Exclude per type. | |
152 Src_Files_EXCLUDE/CORE := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
153 Src_Files_EXCLUDE/COMPILER1 := $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
154 Src_Files_EXCLUDE/COMPILER2 := $(COMPILER1_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) | |
155 Src_Files_EXCLUDE/TIERED := $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) | |
156 Src_Files_EXCLUDE/ZERO := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp | |
157 Src_Files_EXCLUDE/SHARK := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) | |
158 | |
159 Src_Files_EXCLUDE += $(Src_Files_EXCLUDE/$(TYPE)) | |
160 | |
161 # Special handling of arch model. | |
162 ifeq ($(Platform_arch_model), x86_32) | |
163 Src_Files_EXCLUDE += \*x86_64\* | |
164 endif | |
165 ifeq ($(Platform_arch_model), x86_64) | |
166 Src_Files_EXCLUDE += \*x86_32\* | |
167 endif | |
168 | |
169 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. | |
170 define findsrc | |
171 $(notdir $(shell find $(1)/. ! -name . -prune \ | |
172 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ | |
173 -a ! \( -name DUMMY $(addprefix -o -name ,$(Src_Files_EXCLUDE)) \))) | |
174 endef | |
175 | |
176 Src_Files := $(foreach e,$(Src_Dirs),$(call findsrc,$(e))) | |
177 | |
178 Obj_Files = $(sort $(addsuffix .o,$(basename $(Src_Files)))) | |
179 | |
121 JVM_OBJ_FILES = $(Obj_Files) | 180 JVM_OBJ_FILES = $(Obj_Files) |
122 | 181 |
123 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES)) | 182 vm_version.o: $(filter-out vm_version.o,$(JVM_OBJ_FILES)) |
124 | 183 |
125 mapfile : $(MAPFILE) vm.def | 184 mapfile : $(MAPFILE) vm.def |
178 endif | 237 endif |
179 | 238 |
180 LINK_VM = $(LINK_LIB.c) | 239 LINK_VM = $(LINK_LIB.c) |
181 | 240 |
182 # rule for building precompiled header | 241 # rule for building precompiled header |
183 $(PRECOMPILED_HEADER): $(Precompiled_Files) | 242 $(PRECOMPILED_HEADER): |
184 $(QUIETLY) echo Generating precompiled header $@ | 243 $(QUIETLY) echo Generating precompiled header $@ |
185 $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR)/incls | 244 $(QUIETLY) mkdir -p $(PRECOMPILED_HEADER_DIR) |
186 $(QUIETLY) $(COMPILE.CC) -x c++-header -c $(GENERATED)/incls/_precompiled.incl -o $@ $(COMPILE_DONE) | 245 $(QUIETLY) $(COMPILE.CC) $(DEPFLAGS) -x c++-header $(PRECOMPILED_HEADER_SRC) -o $@ $(COMPILE_DONE) |
187 | 246 |
188 # making the library: | 247 # making the library: |
189 | 248 |
190 ifneq ($(JVM_BASE_ADDR),) | 249 ifneq ($(JVM_BASE_ADDR),) |
191 # By default shared library is linked at base address == 0. Modify the | 250 # By default shared library is linked at base address == 0. Modify the |
250 # Serviceability agent | 309 # Serviceability agent |
251 include $(MAKEFILES_DIR)/saproc.make | 310 include $(MAKEFILES_DIR)/saproc.make |
252 | 311 |
253 #---------------------------------------------------------------------- | 312 #---------------------------------------------------------------------- |
254 | 313 |
255 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) checkAndBuildSA | 314 build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) |
256 | 315 |
257 install: install_jvm install_jsig install_saproc | 316 install: install_jvm install_jsig install_saproc |
258 | 317 |
259 .PHONY: default build install install_jvm | 318 .PHONY: default build install install_jvm |