1 # |
1 # |
2 # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2005, 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. |
85 endif |
85 endif |
86 |
86 |
87 # Typical C1/C2 targets made available with this Makefile |
87 # Typical C1/C2 targets made available with this Makefile |
88 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 |
88 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 |
89 C2_VM_TARGETS=product fastdebug optimized jvmg |
89 C2_VM_TARGETS=product fastdebug optimized jvmg |
90 KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel |
|
91 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero |
90 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero |
92 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark |
91 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark |
93 MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1 |
92 MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1 |
94 |
93 |
95 COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product |
94 COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product |
158 $(MAKE) BUILD_FLAVOR=$(@:%1=%) VM_TARGET=$@ generic_build1 $(ALT_OUT) |
157 $(MAKE) BUILD_FLAVOR=$(@:%1=%) VM_TARGET=$@ generic_build1 $(ALT_OUT) |
159 |
158 |
160 $(C2_VM_TARGETS): |
159 $(C2_VM_TARGETS): |
161 $(CD) $(GAMMADIR)/make; \ |
160 $(CD) $(GAMMADIR)/make; \ |
162 $(MAKE) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT) |
161 $(MAKE) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT) |
163 |
|
164 $(KERNEL_VM_TARGETS): |
|
165 $(CD) $(GAMMADIR)/make; \ |
|
166 $(MAKE) BUILD_FLAVOR=$(@:%kernel=%) VM_TARGET=$@ \ |
|
167 generic_buildkernel $(ALT_OUT) |
|
168 |
162 |
169 $(ZERO_VM_TARGETS): |
163 $(ZERO_VM_TARGETS): |
170 $(CD) $(GAMMADIR)/make; \ |
164 $(CD) $(GAMMADIR)/make; \ |
171 $(MAKE) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ \ |
165 $(MAKE) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ \ |
172 generic_buildzero $(ALT_OUT) |
166 generic_buildzero $(ALT_OUT) |
219 $(MAKE_ARGS) $(VM_TARGET) |
213 $(MAKE_ARGS) $(VM_TARGET) |
220 else |
214 else |
221 $(CD) $(OUTPUTDIR); \ |
215 $(CD) $(OUTPUTDIR); \ |
222 $(MAKE) -f $(ABS_OS_MAKEFILE) \ |
216 $(MAKE) -f $(ABS_OS_MAKEFILE) \ |
223 $(MAKE_ARGS) $(VM_TARGET) |
217 $(MAKE_ARGS) $(VM_TARGET) |
224 endif |
|
225 |
|
226 generic_buildkernel: |
|
227 $(MKDIR) -p $(OUTPUTDIR) |
|
228 ifeq ($(OSNAME),windows) |
|
229 ifeq ($(ARCH_DATA_MODEL), 32) |
|
230 $(CD) $(OUTPUTDIR); \ |
|
231 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ |
|
232 Variant=kernel \ |
|
233 WorkSpace=$(ABS_GAMMADIR) \ |
|
234 BootStrapDir=$(ABS_BOOTDIR) \ |
|
235 BuildUser=$(USERNAME) \ |
|
236 $(MAKE_ARGS) $(VM_TARGET:%kernel=%) |
|
237 else |
|
238 @$(ECHO) "No kernel ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" |
|
239 endif |
|
240 else |
|
241 @$(ECHO) "No kernel ($(VM_TARGET)) for OS_NAME=$(OSNAME)" |
|
242 endif |
218 endif |
243 |
219 |
244 generic_buildzero: |
220 generic_buildzero: |
245 $(MKDIR) -p $(OUTPUTDIR) |
221 $(MKDIR) -p $(OUTPUTDIR) |
246 $(CD) $(OUTPUTDIR); \ |
222 $(CD) $(OUTPUTDIR); \ |
312 # Export file copy rules |
288 # Export file copy rules |
313 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt |
289 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt |
314 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs |
290 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs |
315 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 |
291 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 |
316 C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 |
292 C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 |
317 KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel |
|
318 ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero |
293 ZERO_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_zero |
319 SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark |
294 SHARK_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark |
320 C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) |
295 C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) |
321 C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) |
296 C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) |
322 KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) |
|
323 ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR) |
297 ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR) |
324 SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR) |
298 SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR) |
325 MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1 |
299 MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1 |
326 MINIMAL1_DIR=$(MINIMAL1_BASE_DIR)/$(VM_SUBDIR) |
300 MINIMAL1_DIR=$(MINIMAL1_BASE_DIR)/$(VM_SUBDIR) |
327 |
301 |
331 endif |
305 endif |
332 ifeq ($(JVM_VARIANT_CLIENT), true) |
306 ifeq ($(JVM_VARIANT_CLIENT), true) |
333 MISC_DIR=$(C1_DIR) |
307 MISC_DIR=$(C1_DIR) |
334 GEN_DIR=$(C1_BASE_DIR)/generated |
308 GEN_DIR=$(C1_BASE_DIR)/generated |
335 endif |
309 endif |
336 ifeq ($(JVM_VARIANT_KERNEL), true) |
|
337 MISC_DIR=$(C2_DIR) |
|
338 GEN_DIR=$(C2_BASE_DIR)/generated |
|
339 endif |
|
340 ifeq ($(JVM_VARIANT_ZEROSHARK), true) |
310 ifeq ($(JVM_VARIANT_ZEROSHARK), true) |
341 MISC_DIR=$(SHARK_DIR) |
311 MISC_DIR=$(SHARK_DIR) |
342 GEN_DIR=$(SHARK_BASE_DIR)/generated |
312 GEN_DIR=$(SHARK_BASE_DIR)/generated |
343 endif |
313 endif |
344 ifeq ($(JVM_VARIANT_ZERO), true) |
314 ifeq ($(JVM_VARIANT_ZERO), true) |
383 $(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll |
353 $(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll |
384 $(install-file) |
354 $(install-file) |
385 $(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb |
355 $(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb |
386 $(install-file) |
356 $(install-file) |
387 $(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map |
357 $(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map |
388 $(install-file) |
|
389 |
|
390 # Kernel files always come from kernel area |
|
391 $(EXPORT_KERNEL_DIR)/%.diz: $(KERNEL_DIR)/%.diz |
|
392 $(install-file) |
|
393 $(EXPORT_KERNEL_DIR)/%.dll: $(KERNEL_DIR)/%.dll |
|
394 $(install-file) |
|
395 $(EXPORT_KERNEL_DIR)/%.pdb: $(KERNEL_DIR)/%.pdb |
|
396 $(install-file) |
|
397 $(EXPORT_KERNEL_DIR)/%.map: $(KERNEL_DIR)/%.map |
|
398 $(install-file) |
358 $(install-file) |
399 endif |
359 endif |
400 |
360 |
401 # Minimal JVM files always come from minimal area |
361 # Minimal JVM files always come from minimal area |
402 $(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz |
362 $(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz |
583 endif |
542 endif |
584 ifeq ($(findstring true, $(JVM_VARIANT_SERVER)\ |
543 ifeq ($(findstring true, $(JVM_VARIANT_SERVER)\ |
585 $(JVM_VARIANT_ZERO)$(JVM_VARIANT_ZEROSHARK)), true) |
544 $(JVM_VARIANT_ZERO)$(JVM_VARIANT_ZEROSHARK)), true) |
586 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -Xinternalversion |
545 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -Xinternalversion |
587 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -version |
546 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -server -version |
588 endif |
|
589 ifeq ($(JVM_VARIANT_KERNEL), true) |
|
590 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -kernel -Xinternalversion |
|
591 $(JDK_IMAGE_DIR)/bin/java -d$(ARCH_DATA_MODEL) -kernel -version |
|
592 endif |
547 endif |
593 |
548 |
594 copy_product_jdk:: |
549 copy_product_jdk:: |
595 $(RM) -r $(JDK_IMAGE_DIR) |
550 $(RM) -r $(JDK_IMAGE_DIR) |
596 $(MKDIR) -p $(JDK_IMAGE_DIR) |
551 $(MKDIR) -p $(JDK_IMAGE_DIR) |
663 @$(ECHO) "update_jdk: Update JDK image with fresh exported files" |
618 @$(ECHO) "update_jdk: Update JDK image with fresh exported files" |
664 @$(ECHO) " " |
619 @$(ECHO) " " |
665 @$(ECHO) "Other targets are:" |
620 @$(ECHO) "Other targets are:" |
666 @$(ECHO) " $(C1_VM_TARGETS)" |
621 @$(ECHO) " $(C1_VM_TARGETS)" |
667 @$(ECHO) " $(C2_VM_TARGETS)" |
622 @$(ECHO) " $(C2_VM_TARGETS)" |
668 @$(ECHO) " $(KERNEL_VM_TARGETS)" |
|
669 @$(ECHO) " $(MINIMAL1_VM_TARGETS)" |
623 @$(ECHO) " $(MINIMAL1_VM_TARGETS)" |
670 |
624 |
671 # Variable help (only common ones used by this workspace) |
625 # Variable help (only common ones used by this workspace) |
672 variable_help: variable_help_intro variable_list variable_help_end |
626 variable_help: variable_help_intro variable_list variable_help_end |
673 variable_help_intro: |
627 variable_help_intro: |
759 |
713 |
760 # JPRT rule to build this workspace |
714 # JPRT rule to build this workspace |
761 include $(GAMMADIR)/make/jprt.gmk |
715 include $(GAMMADIR)/make/jprt.gmk |
762 |
716 |
763 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ |
717 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ |
764 $(KERNEL_VM_TARGETS) $(MINIMAL1_VM_TARGETS) \ |
718 $(MINIMAL1_VM_TARGETS) \ |
765 generic_build1 generic_build2 generic_buildkernel generic_buildminimal1 generic_export \ |
719 generic_build1 generic_build2 generic_buildminimal1 generic_export \ |
766 export_product export_fastdebug export_debug export_optimized \ |
720 export_product export_fastdebug export_debug export_optimized \ |
767 export_jdk_product export_jdk_fastdebug export_jdk_debug \ |
721 export_jdk_product export_jdk_fastdebug export_jdk_debug \ |
768 create_jdk copy_jdk update_jdk test_jdk \ |
722 create_jdk copy_jdk update_jdk test_jdk \ |
769 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk \ |
723 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk \ |
770 $(HS_ALT_MAKE)/Makefile.make |
724 $(HS_ALT_MAKE)/Makefile.make |