comparison make/linux/Makefile @ 1692:d2ede61b7a12

6976186: integrate Shark HotSpot changes Summary: Shark is a JIT compiler for Zero that uses the LLVM compiler infrastructure. Reviewed-by: kvn, twisti Contributed-by: Gary Benson <gbenson@redhat.com>
author twisti
date Wed, 11 Aug 2010 05:51:21 -0700
parents c18cbe5936b8
children d5d065957597
comparison
equal deleted inserted replaced
1691:4a665be40fd3 1692:d2ede61b7a12
1 # 1 #
2 # Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 2 # Copyright (c) 1999, 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.
166 # jvmgzero zero <os>_<arch>_zero/jvmg 166 # jvmgzero zero <os>_<arch>_zero/jvmg
167 # optimizedzero zero <os>_<arch>_zero/optimized 167 # optimizedzero zero <os>_<arch>_zero/optimized
168 # profiledzero zero <os>_<arch>_zero/profiled 168 # profiledzero zero <os>_<arch>_zero/profiled
169 # productzero zero <os>_<arch>_zero/product 169 # productzero zero <os>_<arch>_zero/product
170 # 170 #
171 # debugshark shark <os>_<arch>_shark/debug
172 # fastdebugshark shark <os>_<arch>_shark/fastdebug
173 # jvmgshark shark <os>_<arch>_shark/jvmg
174 # optimizedshark shark <os>_<arch>_shark/optimized
175 # profiledshark shark <os>_<arch>_shark/profiled
176 # productshark shark <os>_<arch>_shark/product
177 #
171 # What you get with each target: 178 # What you get with each target:
172 # 179 #
173 # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher 180 # debug* - "thin" libjvm_g - debug info linked into the gamma_g launcher
174 # fastdebug* - optimized compile, but with asserts enabled 181 # fastdebug* - optimized compile, but with asserts enabled
175 # jvmg* - "fat" libjvm_g - debug info linked into libjvm_g.so 182 # jvmg* - "fat" libjvm_g - debug info linked into libjvm_g.so
189 SUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS)) 196 SUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS))
190 SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS)) 197 SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
191 SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) 198 SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
192 SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) 199 SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
193 SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS)) 200 SUBDIRS_ZERO = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
201 SUBDIRS_SHARK = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS))
194 202
195 TARGETS_C2 = $(TARGETS) 203 TARGETS_C2 = $(TARGETS)
196 TARGETS_C1 = $(addsuffix 1,$(TARGETS)) 204 TARGETS_C1 = $(addsuffix 1,$(TARGETS))
197 TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) 205 TARGETS_TIERED = $(addsuffix tiered,$(TARGETS))
198 TARGETS_CORE = $(addsuffix core,$(TARGETS)) 206 TARGETS_CORE = $(addsuffix core,$(TARGETS))
199 TARGETS_ZERO = $(addsuffix zero,$(TARGETS)) 207 TARGETS_ZERO = $(addsuffix zero,$(TARGETS))
208 TARGETS_SHARK = $(addsuffix shark,$(TARGETS))
200 209
201 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make 210 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
202 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) 211 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
203 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) 212 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
204 213
211 @echo "Try '$(MAKE) <target> ...' where <target> is one or more of" 220 @echo "Try '$(MAKE) <target> ...' where <target> is one or more of"
212 @echo " $(TARGETS_C2)" 221 @echo " $(TARGETS_C2)"
213 @echo " $(TARGETS_C1)" 222 @echo " $(TARGETS_C1)"
214 @echo " $(TARGETS_CORE)" 223 @echo " $(TARGETS_CORE)"
215 @echo " $(TARGETS_ZERO)" 224 @echo " $(TARGETS_ZERO)"
225 @echo " $(TARGETS_SHARK)"
216 226
217 checks: check_os_version check_j2se_version 227 checks: check_os_version check_j2se_version
218 228
219 # We do not want people accidentally building on old systems (e.g. Linux 2.2.x, 229 # We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
220 # Solaris 2.5.1, 2.6). 230 # Solaris 2.5.1, 2.6).
264 274
265 $(SUBDIRS_ZERO): $(BUILDTREE_MAKE) platform_zero 275 $(SUBDIRS_ZERO): $(BUILDTREE_MAKE) platform_zero
266 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks 276 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
267 $(BUILDTREE) VARIANT=zero VARIANTARCH=$(VARIANTARCH) 277 $(BUILDTREE) VARIANT=zero VARIANTARCH=$(VARIANTARCH)
268 278
279 $(SUBDIRS_SHARK): $(BUILDTREE_MAKE) platform_zero
280 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
281 $(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH)
282
269 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in 283 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
270 $(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@ 284 $(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@
271 285
272 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME 286 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME
273 287
302 $(TARGETS_ZERO): $(SUBDIRS_ZERO) 316 $(TARGETS_ZERO): $(SUBDIRS_ZERO)
303 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) 317 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS)
304 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && ./test_gamma 318 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && ./test_gamma
305 ifdef INSTALL 319 ifdef INSTALL
306 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install 320 cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install
321 endif
322
323 $(TARGETS_SHARK): $(SUBDIRS_SHARK)
324 cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
325 cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && ./test_gamma
326 ifdef INSTALL
327 cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
307 endif 328 endif
308 329
309 # Just build the tree, and nothing else: 330 # Just build the tree, and nothing else:
310 tree: $(SUBDIRS_C2) 331 tree: $(SUBDIRS_C2)
311 tree1: $(SUBDIRS_C1) 332 tree1: $(SUBDIRS_C1)
312 treecore: $(SUBDIRS_CORE) 333 treecore: $(SUBDIRS_CORE)
313 treezero: $(SUBDIRS_ZERO) 334 treezero: $(SUBDIRS_ZERO)
335 treeshark: $(SUBDIRS_SHARK)
314 336
315 # Doc target. This is the same for all build options. 337 # Doc target. This is the same for all build options.
316 # Hence create a docs directory beside ...$(ARCH)_[...] 338 # Hence create a docs directory beside ...$(ARCH)_[...]
317 docs: checks 339 docs: checks
318 $(QUIETLY) mkdir -p $(SUBDIR_DOCS) 340 $(QUIETLY) mkdir -p $(SUBDIR_DOCS)
325 347
326 core: jvmgcore productcore 348 core: jvmgcore productcore
327 349
328 zero: jvmgzero productzero 350 zero: jvmgzero productzero
329 351
352 shark: jvmgshark productshark
353
330 clean_docs: 354 clean_docs:
331 rm -rf $(SUBDIR_DOCS) 355 rm -rf $(SUBDIR_DOCS)
332 356
333 clean_compiler1 clean_compiler2 clean_core clean_zero: 357 clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark:
334 rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) 358 rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
335 359
336 clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_docs 360 clean: clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs
337 361
338 include $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make 362 include $(GAMMADIR)/make/$(OSNAME)/makefiles/cscope.make
339 363
340 #------------------------------------------------------------------------------- 364 #-------------------------------------------------------------------------------
341 365
342 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) 366 .PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK)
343 .PHONY: tree tree1 treecore treezero 367 .PHONY: tree tree1 treecore treezero treeshark
344 .PHONY: all compiler1 compiler2 core zero 368 .PHONY: all compiler1 compiler2 core zero shark
345 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero docs clean_docs 369 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs
346 .PHONY: checks check_os_version check_j2se_version 370 .PHONY: checks check_os_version check_j2se_version