Mercurial > hg > graal-jvmci-8
comparison make/Makefile @ 4865:481a9443f721
7123386: RFE: Preserve universal builds of HotSpot on Mac OS X
Summary: Add support for packaging HotSpot JVM builds in universal binaries
Reviewed-by: dholmes, kamg, dcubed, phh
Contributed-by: james.melvin@oracle.com
author | phh |
---|---|
date | Wed, 01 Feb 2012 15:01:08 -0500 |
parents | 94ec88ca68e2 |
children | f09ae3853e3b |
comparison
equal
deleted
inserted
replaced
4864:b2cd0ee8f778 | 4865:481a9443f721 |
---|---|
1 # | 1 # |
2 # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 2005, 2012, 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. |
87 C2_VM_TARGETS=product fastdebug optimized jvmg | 87 C2_VM_TARGETS=product fastdebug optimized jvmg |
88 KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel | 88 KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel |
89 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero | 89 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero |
90 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark | 90 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark |
91 | 91 |
92 COMMON_VM_PRODUCT_TARGETS=product product1 productkernel docs export_product | |
93 COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 fastdebugkernel docs export_fastdebug | |
94 COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 jvmgkernel docs export_debug | |
95 | |
92 # JDK directory list | 96 # JDK directory list |
93 JDK_DIRS=bin include jre lib demo | 97 JDK_DIRS=bin include jre lib demo |
94 | 98 |
95 all: all_product all_fastdebug | 99 all: all_product all_fastdebug |
96 ifndef BUILD_CLIENT_ONLY | 100 |
97 all_product: product product1 productkernel docs export_product | 101 ifdef BUILD_CLIENT_ONLY |
98 all_fastdebug: fastdebug fastdebug1 fastdebugkernel docs export_fastdebug | |
99 all_debug: jvmg jvmg1 jvmgkernel docs export_debug | |
100 else | |
101 all_product: product1 docs export_product | 102 all_product: product1 docs export_product |
102 all_fastdebug: fastdebug1 docs export_fastdebug | 103 all_fastdebug: fastdebug1 docs export_fastdebug |
103 all_debug: jvmg1 docs export_debug | 104 all_debug: jvmg1 docs export_debug |
104 endif | 105 else |
106 ifeq ($(MACOSX_UNIVERSAL),true) | |
107 all_product: universal_product | |
108 all_fastdebug: universal_fastdebug | |
109 all_debug: universal_debug | |
110 else | |
111 all_product: $(COMMON_VM_PRODUCT_TARGETS) | |
112 all_fastdebug: $(COMMON_VM_FASTDEBUG_TARGETS) | |
113 all_debug: $(COMMON_VM_DEBUG_TARGETS) | |
114 endif | |
115 endif | |
116 | |
105 all_optimized: optimized optimized1 optimizedkernel docs export_optimized | 117 all_optimized: optimized optimized1 optimizedkernel docs export_optimized |
106 | 118 |
107 allzero: all_productzero all_fastdebugzero | 119 allzero: all_productzero all_fastdebugzero |
108 all_productzero: productzero docs export_product | 120 all_productzero: productzero docs export_product |
109 all_fastdebugzero: fastdebugzero docs export_fastdebug | 121 all_fastdebugzero: fastdebugzero docs export_fastdebug |
230 $(MAKE) VM_SUBDIR=fastdebug EXPORT_SUBDIR=/fastdebug generic_export | 242 $(MAKE) VM_SUBDIR=fastdebug EXPORT_SUBDIR=/fastdebug generic_export |
231 export_debug: | 243 export_debug: |
232 $(MAKE) VM_SUBDIR=${VM_DEBUG} EXPORT_SUBDIR=/debug generic_export | 244 $(MAKE) VM_SUBDIR=${VM_DEBUG} EXPORT_SUBDIR=/debug generic_export |
233 export_optimized: | 245 export_optimized: |
234 $(MAKE) VM_SUBDIR=optimized EXPORT_SUBDIR=/optimized generic_export | 246 $(MAKE) VM_SUBDIR=optimized EXPORT_SUBDIR=/optimized generic_export |
235 export_product_jdk: | 247 export_product_jdk:: |
236 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ | 248 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ |
237 VM_SUBDIR=product generic_export | 249 VM_SUBDIR=product generic_export |
238 export_optimized_jdk: | 250 export_optimized_jdk:: |
239 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ | 251 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \ |
240 VM_SUBDIR=optimized generic_export | 252 VM_SUBDIR=optimized generic_export |
241 export_fastdebug_jdk: | 253 export_fastdebug_jdk:: |
242 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/fastdebug \ | 254 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/fastdebug \ |
243 VM_SUBDIR=fastdebug generic_export | 255 VM_SUBDIR=fastdebug generic_export |
244 export_debug_jdk: | 256 export_debug_jdk:: |
245 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/debug \ | 257 $(MAKE) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/debug \ |
246 VM_SUBDIR=${VM_DEBUG} generic_export | 258 VM_SUBDIR=${VM_DEBUG} generic_export |
247 | |
248 | 259 |
249 # Export file copy rules | 260 # Export file copy rules |
250 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt | 261 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt |
251 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs | 262 DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs |
252 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 | 263 C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 |
442 $(JDK_IMAGE_DIR)/bin/java -client -version | 453 $(JDK_IMAGE_DIR)/bin/java -client -version |
443 endif | 454 endif |
444 endif | 455 endif |
445 $(JDK_IMAGE_DIR)/bin/java -server -version | 456 $(JDK_IMAGE_DIR)/bin/java -server -version |
446 | 457 |
447 copy_product_jdk: | 458 copy_product_jdk:: |
448 $(RM) -r $(JDK_IMAGE_DIR) | 459 $(RM) -r $(JDK_IMAGE_DIR) |
449 $(MKDIR) -p $(JDK_IMAGE_DIR) | 460 $(MKDIR) -p $(JDK_IMAGE_DIR) |
450 ($(CD) $(JDK_IMPORT_PATH) && \ | 461 ($(CD) $(JDK_IMPORT_PATH) && \ |
451 $(TAR) -cf - $(JDK_DIRS)) | \ | 462 $(TAR) -cf - $(JDK_DIRS)) | \ |
452 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -) | 463 ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xf -) |
453 | 464 |
454 copy_fastdebug_jdk: | 465 copy_fastdebug_jdk:: |
455 $(RM) -r $(JDK_IMAGE_DIR)/fastdebug | 466 $(RM) -r $(JDK_IMAGE_DIR)/fastdebug |
456 $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug | 467 $(MKDIR) -p $(JDK_IMAGE_DIR)/fastdebug |
457 if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \ | 468 if [ -d $(JDK_IMPORT_PATH)/fastdebug ] ; then \ |
458 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \ | 469 ($(CD) $(JDK_IMPORT_PATH)/fastdebug && \ |
459 $(TAR) -cf - $(JDK_DIRS)) | \ | 470 $(TAR) -cf - $(JDK_DIRS)) | \ |
462 ($(CD) $(JDK_IMPORT_PATH) && \ | 473 ($(CD) $(JDK_IMPORT_PATH) && \ |
463 $(TAR) -cf - $(JDK_DIRS)) | \ | 474 $(TAR) -cf - $(JDK_DIRS)) | \ |
464 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \ | 475 ($(CD) $(JDK_IMAGE_DIR)/fastdebug && $(TAR) -xf -) ; \ |
465 fi | 476 fi |
466 | 477 |
467 copy_debug_jdk: | 478 copy_debug_jdk:: |
468 $(RM) -r $(JDK_IMAGE_DIR)/debug | 479 $(RM) -r $(JDK_IMAGE_DIR)/debug |
469 $(MKDIR) -p $(JDK_IMAGE_DIR)/debug | 480 $(MKDIR) -p $(JDK_IMAGE_DIR)/debug |
470 if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \ | 481 if [ -d $(JDK_IMPORT_PATH)/debug ] ; then \ |
471 ($(CD) $(JDK_IMPORT_PATH)/debug && \ | 482 ($(CD) $(JDK_IMPORT_PATH)/debug && \ |
472 $(TAR) -cf - $(JDK_DIRS)) | \ | 483 $(TAR) -cf - $(JDK_DIRS)) | \ |
478 else \ | 489 else \ |
479 ($(CD) $(JDK_IMPORT_PATH) && \ | 490 ($(CD) $(JDK_IMPORT_PATH) && \ |
480 $(TAR) -cf - $(JDK_DIRS)) | \ | 491 $(TAR) -cf - $(JDK_DIRS)) | \ |
481 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ | 492 ($(CD) $(JDK_IMAGE_DIR)/debug && $(TAR) -xf -) ; \ |
482 fi | 493 fi |
483 | |
484 # macosx universal builds | |
485 | |
486 ifeq ($(MACOSX_UNIVERSAL), true) | |
487 $(UNIVERSAL_LIPO_LIST): | |
488 lipo -create -output $@ $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) | |
489 | |
490 $(UNIVERSAL_COPY_LIST): | |
491 $(CP) $(EXPORT_JRE_LIB_DIR)/i386/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) $@ | |
492 | |
493 universalize: $(UNIVERSAL_LIPO_LIST) $(UNIVERSAL_COPY_LIST) | |
494 endif | |
495 | |
496 universal_product: | |
497 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 MACOSX_UNIVERSAL=true all_product | |
498 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 MACOSX_UNIVERSAL=true all_product | |
499 $(MKDIR) -p $(EXPORT_JRE_LIB_DIR)/{client,server} | |
500 $(QUIETLY) $(MAKE) MACOSX_UNIVERSAL=true universalize | |
501 | |
502 universal_fastdebug: | |
503 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 MACOSX_UNIVERSAL=true all_fastdebug | |
504 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 MACOSX_UNIVERSAL=true all_fastdebug | |
505 $(MKDIR) -p $(EXPORT_JRE_LIB_DIR)/{client,server} | |
506 $(QUIETLY) $(MAKE) MACOSX_UNIVERSAL=true universalize | |
507 | |
508 universal_debug: | |
509 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 MACOSX_UNIVERSAL=true all_debug | |
510 $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 MACOSX_UNIVERSAL=true all_debug | |
511 $(MKDIR) -p $(EXPORT_JRE_LIB_DIR)/{client,server} | |
512 $(QUIETLY) $(MAKE) MACOSX_UNIVERSAL=true universalize | |
513 | 494 |
514 # | 495 # |
515 # Check target | 496 # Check target |
516 # | 497 # |
517 check: variable_check | 498 check: variable_check |
628 @$(ECHO) \ | 609 @$(ECHO) \ |
629 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)" | 610 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)" |
630 @$(ECHO) \ | 611 @$(ECHO) \ |
631 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)" | 612 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)" |
632 | 613 |
614 # Universal build support | |
615 ifeq ($(OS_VENDOR), Darwin) | |
616 ifeq ($(MACOSX_UNIVERSAL),true) | |
617 include $(GAMMADIR)/make/$(OSNAME)/makefiles/universal.gmk | |
618 endif | |
619 endif | |
620 | |
633 # JPRT rule to build this workspace | 621 # JPRT rule to build this workspace |
634 include $(GAMMADIR)/make/jprt.gmk | 622 include $(GAMMADIR)/make/jprt.gmk |
635 | 623 |
636 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ | 624 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ |
637 $(KERNEL_VM_TARGETS) \ | 625 $(KERNEL_VM_TARGETS) \ |
638 generic_build1 generic_build2 generic_buildkernel generic_export \ | 626 generic_build1 generic_build2 generic_buildkernel generic_export \ |
639 export_product export_fastdebug export_debug export_optimized \ | 627 export_product export_fastdebug export_debug export_optimized \ |
640 export_jdk_product export_jdk_fastdebug export_jdk_debug \ | 628 export_jdk_product export_jdk_fastdebug export_jdk_debug \ |
641 create_jdk copy_jdk update_jdk test_jdk \ | 629 create_jdk copy_jdk update_jdk test_jdk \ |
642 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk universalize \ | 630 copy_product_jdk copy_fastdebug_jdk copy_debug_jdk |
643 universal_product | |
644 |