1 # |
1 # |
2 # Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 1998, 2013, 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. |
155 SUBDIR_DOCS = $(OSNAME)_$(BUILDARCH)_docs |
155 SUBDIR_DOCS = $(OSNAME)_$(BUILDARCH)_docs |
156 SUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS)) |
156 SUBDIRS_C1 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler1/,$(TARGETS)) |
157 SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS)) |
157 SUBDIRS_C2 = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS)) |
158 SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) |
158 SUBDIRS_TIERED = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS)) |
159 SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) |
159 SUBDIRS_CORE = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS)) |
160 SUBDIRS_KERNEL = $(addprefix $(OSNAME)_$(BUILDARCH)_kernel/,$(TARGETS)) |
|
161 |
160 |
162 TARGETS_C2 = $(TARGETS) |
161 TARGETS_C2 = $(TARGETS) |
163 TARGETS_C1 = $(addsuffix 1,$(TARGETS)) |
162 TARGETS_C1 = $(addsuffix 1,$(TARGETS)) |
164 TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) |
163 TARGETS_TIERED = $(addsuffix tiered,$(TARGETS)) |
165 TARGETS_CORE = $(addsuffix core,$(TARGETS)) |
164 TARGETS_CORE = $(addsuffix core,$(TARGETS)) |
166 TARGETS_KERNEL = $(addsuffix kernel,$(TARGETS)) |
|
167 |
165 |
168 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make |
166 BUILDTREE_MAKE = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make |
169 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) |
167 BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) |
170 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) |
168 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) |
171 BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) |
169 BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE) |
227 |
225 |
228 $(SUBDIRS_CORE): $(BUILDTREE_MAKE) |
226 $(SUBDIRS_CORE): $(BUILDTREE_MAKE) |
229 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks |
227 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks |
230 $(BUILDTREE) VARIANT=core |
228 $(BUILDTREE) VARIANT=core |
231 |
229 |
232 $(SUBDIRS_KERNEL): $(BUILDTREE_MAKE) |
|
233 $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks |
|
234 $(BUILDTREE) VARIANT=kernel |
|
235 |
|
236 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME |
230 # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME |
237 |
231 |
238 $(TARGETS_C2): $(SUBDIRS_C2) |
232 $(TARGETS_C2): $(SUBDIRS_C2) |
239 cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) |
233 cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) |
240 ifeq ($(TEST_IN_BUILD),true) |
234 ifeq ($(TEST_IN_BUILD),true) |
269 endif |
263 endif |
270 ifdef INSTALL |
264 ifdef INSTALL |
271 cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install |
265 cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install |
272 endif |
266 endif |
273 |
267 |
274 $(TARGETS_KERNEL): $(SUBDIRS_KERNEL) |
|
275 cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS) |
|
276 ifeq ($(TEST_IN_BUILD),true) |
|
277 cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && ./test_gamma |
|
278 endif |
|
279 ifdef INSTALL |
|
280 cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS) install |
|
281 endif |
|
282 |
|
283 # Just build the tree, and nothing else: |
268 # Just build the tree, and nothing else: |
284 tree: $(SUBDIRS_C2) |
269 tree: $(SUBDIRS_C2) |
285 tree1: $(SUBDIRS_C1) |
270 tree1: $(SUBDIRS_C1) |
286 treecore: $(SUBDIRS_CORE) |
271 treecore: $(SUBDIRS_CORE) |
287 treekernel: $(SUBDIRS_KERNEL) |
|
288 |
272 |
289 # Doc target. This is the same for all build options. |
273 # Doc target. This is the same for all build options. |
290 # Hence create a docs directory beside ...$(ARCH)_[...] |
274 # Hence create a docs directory beside ...$(ARCH)_[...] |
291 # We specify 'BUILD_FLAVOR=product' so that the proper |
275 # We specify 'BUILD_FLAVOR=product' so that the proper |
292 # ENABLE_FULL_DEBUG_SYMBOLS value is used. |
276 # ENABLE_FULL_DEBUG_SYMBOLS value is used. |
302 core: jvmgcore productcore |
286 core: jvmgcore productcore |
303 |
287 |
304 clean_docs: |
288 clean_docs: |
305 rm -rf $(SUBDIR_DOCS) |
289 rm -rf $(SUBDIR_DOCS) |
306 |
290 |
307 clean_compiler1 clean_compiler2 clean_core clean_kernel: |
291 clean_compiler1 clean_compiler2 clean_core: |
308 rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) |
292 rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@) |
309 |
293 |
310 clean: clean_compiler2 clean_compiler1 clean_core clean_docs clean_kernel |
294 clean: clean_compiler2 clean_compiler1 clean_core clean_docs |
311 |
295 |
312 include $(GAMMADIR)/make/cscope.make |
296 include $(GAMMADIR)/make/cscope.make |
313 |
297 |
314 #------------------------------------------------------------------------------- |
298 #------------------------------------------------------------------------------- |
315 |
299 |