Mercurial > hg > graal-compiler
comparison make/Makefile @ 9225:9d29e5aa54d2
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Sat, 20 Apr 2013 12:23:29 +0200 |
parents | 1d584a42941f |
children | 2a091d2987bd |
comparison
equal
deleted
inserted
replaced
9224:b69312e4eceb | 9225:9d29e5aa54d2 |
---|---|
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 # | 18 # |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 # or visit www.oracle.com if you need additional information or have any | 20 # or visit www.oracle.com if you need additional information or have any |
21 # questions. | 21 # questions. |
22 # | 22 # |
23 # | 23 # |
24 | 24 |
25 # Top level gnumake file for hotspot builds | 25 # Top level gnumake file for hotspot builds |
26 # | 26 # |
27 # Default is to build the both product images and construct an export dir. | 27 # Default is to build the both product images and construct an export dir. |
84 ALT_OUT= | 84 ALT_OUT= |
85 endif | 85 endif |
86 | 86 |
87 # Directory for shared code (e.g. graal.jar) | 87 # Directory for shared code (e.g. graal.jar) |
88 SHARED_DIR=$(OUTPUTDIR)/shared | 88 SHARED_DIR=$(OUTPUTDIR)/shared |
89 BUILD_GRAAL_JAR ?= true | |
89 | 90 |
90 # Typical C1/C2 targets made available with this Makefile | 91 # Typical C1/C2 targets made available with this Makefile |
91 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 | 92 C1_VM_TARGETS=product1 fastdebug1 optimized1 debug1 |
92 C2_VM_TARGETS=product fastdebug optimized jvmg | 93 C2_VM_TARGETS=product fastdebug optimized debug |
93 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero | 94 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero debugzero |
94 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark | 95 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark debugshark |
95 MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1 | 96 MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 debugminimal1 |
96 GRAAL_VM_TARGETS=productgraal fastdebuggraal optimizedgraal jvmggraal | 97 GRAAL_VM_TARGETS=productgraal fastdebuggraal optimizedgraal debuggraal |
97 | 98 |
98 COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product | 99 COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product |
99 COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 docs export_fastdebug | 100 COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 docs export_fastdebug |
100 COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 docs export_debug | 101 COMMON_VM_DEBUG_TARGETS=debug debug1 docs export_debug |
101 | 102 |
102 # JDK directory list | 103 # JDK directory list |
103 JDK_DIRS=bin include jre lib demo | 104 JDK_DIRS=bin include jre lib demo |
104 | 105 |
105 all: all_product all_fastdebug | 106 all: all_product all_fastdebug |
106 | 107 |
107 ifeq ($(JVM_VARIANT_MINIMAL1),true) | 108 ifeq ($(JVM_VARIANT_MINIMAL1),true) |
108 all_product: productminimal1 | 109 all_product: productminimal1 |
109 all_fastdebug: fastdebugminimal1 | 110 all_fastdebug: fastdebugminimal1 |
110 all_debug: jvmgminimal1 | 111 all_debug: debugminimal1 |
111 endif | 112 endif |
112 | 113 |
113 ifdef BUILD_CLIENT_ONLY | 114 ifdef BUILD_CLIENT_ONLY |
114 all_product: product1 docs export_product | 115 all_product: product1 docs export_product |
115 all_fastdebug: fastdebug1 docs export_fastdebug | 116 all_fastdebug: fastdebug1 docs export_fastdebug |
116 all_debug: jvmg1 docs export_debug | 117 all_debug: debug1 docs export_debug |
117 else | 118 else |
118 ifeq ($(MACOSX_UNIVERSAL),true) | 119 ifeq ($(MACOSX_UNIVERSAL),true) |
119 all_product: universal_product | 120 all_product: universal_product |
120 all_fastdebug: universal_fastdebug | 121 all_fastdebug: universal_fastdebug |
121 all_debug: universal_debug | 122 all_debug: universal_debug |
129 all_optimized: optimized optimized1 docs export_optimized | 130 all_optimized: optimized optimized1 docs export_optimized |
130 | 131 |
131 allzero: all_productzero all_fastdebugzero | 132 allzero: all_productzero all_fastdebugzero |
132 all_productzero: productzero docs export_product | 133 all_productzero: productzero docs export_product |
133 all_fastdebugzero: fastdebugzero docs export_fastdebug | 134 all_fastdebugzero: fastdebugzero docs export_fastdebug |
134 all_debugzero: jvmgzero docs export_debug | 135 all_debugzero: debugzero docs export_debug |
135 all_optimizedzero: optimizedzero docs export_optimized | 136 all_optimizedzero: optimizedzero docs export_optimized |
136 | 137 |
137 allshark: all_productshark all_fastdebugshark | 138 allshark: all_productshark all_fastdebugshark |
138 all_productshark: productshark docs export_product | 139 all_productshark: productshark docs export_product |
139 all_fastdebugshark: fastdebugshark docs export_fastdebug | 140 all_fastdebugshark: fastdebugshark docs export_fastdebug |
140 all_debugshark: jvmgshark docs export_debug | 141 all_debugshark: debugshark docs export_debug |
141 all_optimizedshark: optimizedshark docs export_optimized | 142 all_optimizedshark: optimizedshark docs export_optimized |
142 | 143 |
143 allgraal: all_productgraal all_fastdebuggraal | 144 allgraal: all_productgraal all_fastdebuggraal |
144 all_productgraal: productgraal docs export_product | 145 all_productgraal: productgraal docs export_product |
145 all_fastdebuggraal: fastdebuggraal docs export_fastdebug | 146 all_fastdebuggraal: fastdebuggraal docs export_fastdebug |
146 all_debuggraal: jvmggraal docs export_debug | 147 all_debuggraal: debuggraal docs export_debug |
147 all_optimizedgraal: optimizedgraal docs export_optimized | 148 all_optimizedgraal: optimizedgraal docs export_optimized |
148 | 149 |
149 # Do everything | 150 # Do everything |
150 world: all create_jdk | 151 world: all create_jdk |
151 | 152 |
236 | 237 |
237 generic_buildshark: | 238 generic_buildshark: |
238 $(MKDIR) -p $(OUTPUTDIR) | 239 $(MKDIR) -p $(OUTPUTDIR) |
239 $(CD) $(OUTPUTDIR); \ | 240 $(CD) $(OUTPUTDIR); \ |
240 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | 241 $(MAKE) -f $(ABS_OS_MAKEFILE) \ |
241 $(MAKE_ARGS) $(VM_TARGET) | 242 $(MAKE_ARGS) $(VM_TARGET) |
242 | 243 |
243 generic_buildminimal1: | 244 generic_buildminimal1: |
244 ifeq ($(JVM_VARIANT_MINIMAL1),true) | 245 ifeq ($(JVM_VARIANT_MINIMAL1),true) |
245 $(MKDIR) -p $(OUTPUTDIR) | 246 $(MKDIR) -p $(OUTPUTDIR) |
246 ifeq ($(ARCH_DATA_MODEL), 32) | 247 ifeq ($(ARCH_DATA_MODEL), 32) |
265 $(MKDIR) -p $(OUTPUTDIR) | 266 $(MKDIR) -p $(OUTPUTDIR) |
266 $(CD) $(OUTPUTDIR); \ | 267 $(CD) $(OUTPUTDIR); \ |
267 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | 268 $(MAKE) -f $(ABS_OS_MAKEFILE) \ |
268 $(MAKE_ARGS) $(VM_TARGET) | 269 $(MAKE_ARGS) $(VM_TARGET) |
269 | 270 |
271 | |
270 # Builds code that can be shared among different build flavors | 272 # Builds code that can be shared among different build flavors |
271 buildshared: | 273 buildshared: |
274 ifeq ($(BUILD_GRAAL_JAR),true) | |
272 $(REMOTE) $(ANT) -f $(GAMMADIR)/make/build-graal.xml -Dgamma.dir=$(GAMMADIR) -Dshared.dir=$(SHARED_DIR) | 275 $(REMOTE) $(ANT) -f $(GAMMADIR)/make/build-graal.xml -Dgamma.dir=$(GAMMADIR) -Dshared.dir=$(SHARED_DIR) |
276 endif | |
273 | 277 |
274 # Export file rule | 278 # Export file rule |
275 generic_export: $(EXPORT_LIST) | 279 generic_export: $(EXPORT_LIST) |
276 export_product: | 280 export_product: |
277 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ | 281 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ |
279 export_fastdebug: | 283 export_fastdebug: |
280 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ | 284 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ |
281 EXPORT_SUBDIR=/$(@:export_%=%) \ | 285 EXPORT_SUBDIR=/$(@:export_%=%) \ |
282 generic_export | 286 generic_export |
283 export_debug: | 287 export_debug: |
284 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=${VM_DEBUG} \ | 288 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ |
285 EXPORT_SUBDIR=/$(@:export_%=%) \ | 289 EXPORT_SUBDIR=/$(@:export_%=%) \ |
286 generic_export | 290 generic_export |
287 export_optimized: | 291 export_optimized: |
288 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ | 292 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ |
289 EXPORT_SUBDIR=/$(@:export_%=%) \ | 293 EXPORT_SUBDIR=/$(@:export_%=%) \ |
300 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \ | 304 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \ |
301 VM_SUBDIR=$(@:export_%_jdk=%) \ | 305 VM_SUBDIR=$(@:export_%_jdk=%) \ |
302 ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \ | 306 ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \ |
303 generic_export | 307 generic_export |
304 export_debug_jdk:: | 308 export_debug_jdk:: |
305 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) VM_SUBDIR=${VM_DEBUG} \ | 309 $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) VM_SUBDIR=$(@:export_%_jdk=%) \ |
306 ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \ | 310 ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \ |
307 generic_export | 311 generic_export |
308 | 312 |
309 # Export file copy rules | 313 # Export file copy rules |
310 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt | 314 XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt |
344 endif | 348 endif |
345 | 349 |
346 # Bin files (windows) | 350 # Bin files (windows) |
347 ifeq ($(OSNAME),windows) | 351 ifeq ($(OSNAME),windows) |
348 | 352 |
349 # Get jvm.lib | 353 # Get jvm.lib |
350 $(EXPORT_LIB_DIR)/%.lib: $(MISC_DIR)/%.lib | 354 $(EXPORT_LIB_DIR)/%.lib: $(MISC_DIR)/%.lib |
351 $(install-file) | 355 $(install-file) |
352 | 356 |
353 # Other libraries (like SA) | 357 # Other libraries (like SA) |
354 $(EXPORT_JRE_BIN_DIR)/%.diz: $(MISC_DIR)/%.diz | 358 $(EXPORT_JRE_BIN_DIR)/%.diz: $(MISC_DIR)/%.diz |
589 @$(ECHO) "Running with: $(ALTJVM_DIR)" | 593 @$(ECHO) "Running with: $(ALTJVM_DIR)" |
590 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion | 594 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -Xinternalversion |
591 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help | 595 @$(RUN_JVM) -XXaltjvm=$(ALTJVM_DIR) -showversion -help |
592 | 596 |
593 # C2 test targets | 597 # C2 test targets |
594 test_product test_optimized test_fastdebug test_jvmg: | 598 test_product test_optimized test_fastdebug test_debug: |
595 @$(MAKE) generic_test ALTJVM_DIR="$(C2_DIR)/$(@:test_%=%)" | 599 @$(MAKE) generic_test ALTJVM_DIR="$(C2_DIR)/$(@:test_%=%)" |
596 | 600 |
597 # C1 test targets | 601 # C1 test targets |
598 test_product1 test_optimized1 test_fastdebug1 test_jvmg1: | 602 test_product1 test_optimized1 test_fastdebug1 test_debug1: |
599 ifeq ($(ARCH_DATA_MODEL), 32) | 603 ifeq ($(ARCH_DATA_MODEL), 32) |
600 @$(MAKE) generic_test ALTJVM_DIR="$(C1_DIR)/$(@:test_%1=%)" | 604 @$(MAKE) generic_test ALTJVM_DIR="$(C1_DIR)/$(@:test_%1=%)" |
601 else | 605 else |
602 @$(ECHO) "No compiler1 ($(@:test_%=%)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" | 606 @$(ECHO) "No compiler1 ($(@:test_%=%)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" |
603 endif | 607 endif |
604 | 608 |
605 # Zero test targets | 609 # Zero test targets |
606 test_productzero test_optimizedzero test_fastdebugzero test_jvmgzero: | 610 test_productzero test_optimizedzero test_fastdebugzero test_debugzero: |
607 @$(MAKE) generic_test ALTJVM_DIR="$(ZERO_DIR)/$(@:test_%zero=%)" | 611 @$(MAKE) generic_test ALTJVM_DIR="$(ZERO_DIR)/$(@:test_%zero=%)" |
608 | 612 |
609 # Shark test targets | 613 # Shark test targets |
610 test_productshark test_optimizedshark test_fastdebugshark test_jvmgshark: | 614 test_productshark test_optimizedshark test_fastdebugshark test_debugshark: |
611 @$(MAKE) generic_test ALTJVM_DIR="$(SHARK_DIR)/$(@:test_%shark=%)" | 615 @$(MAKE) generic_test ALTJVM_DIR="$(SHARK_DIR)/$(@:test_%shark=%)" |
612 | 616 |
613 # Minimal1 test targets | 617 # Minimal1 test targets |
614 test_productminimal1 test_optimizedminimal1 test_fastdebugminimal1 test_jvmgminimal1: | 618 test_productminimal1 test_optimizedminimal1 test_fastdebugminimal1 test_debugminimal1: |
615 @$(MAKE) generic_test ALTJVM_DIR="$(MINIMAL1_DIR)/$(@:test_%minimal1=%)" | 619 @$(MAKE) generic_test ALTJVM_DIR="$(MINIMAL1_DIR)/$(@:test_%minimal1=%)" |
616 | 620 |
617 | 621 |
618 test_jdk: | 622 test_jdk: |
619 ifeq ($(JVM_VARIANT_CLIENT), true) | 623 ifeq ($(JVM_VARIANT_CLIENT), true) |
674 help: intro_help target_help variable_help notes_help examples_help | 678 help: intro_help target_help variable_help notes_help examples_help |
675 | 679 |
676 # Intro help message | 680 # Intro help message |
677 intro_help: | 681 intro_help: |
678 @$(ECHO) \ | 682 @$(ECHO) \ |
679 "Makefile for the Hotspot workspace." | 683 "Makefile for the Hotspot workspace." |
680 @$(ECHO) \ | 684 @$(ECHO) \ |
681 "Default behavior is to build and create an export area for the j2se builds." | 685 "Default behavior is to build and create an export area for the j2se builds." |
682 | 686 |
683 # Target help | 687 # Target help |
684 target_help: | 688 target_help: |
685 @$(ECHO) "help: This help message" | 689 @$(ECHO) "help: This help message" |
686 @$(ECHO) "all: Same as: all_product all_fastdebug" | 690 @$(ECHO) "all: Same as: all_product all_fastdebug" |
687 @$(ECHO) "world: Same as: all create_jdk" | 691 @$(ECHO) "world: Same as: all create_jdk" |
688 @$(ECHO) "all_product: Same as: product product1 export_product" | 692 @$(ECHO) "all_product: Same as: product product1 export_product" |
689 @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug" | 693 @$(ECHO) "all_fastdebug: Same as: fastdebug fastdebug1 export_fastdebug" |
690 @$(ECHO) "all_debug: Same as: jvmg jvmg1 export_debug" | 694 @$(ECHO) "all_debug: Same as: debug debug1 export_debug" |
691 @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized" | 695 @$(ECHO) "all_optimized: Same as: optimized optimized1 export_optimized" |
692 @$(ECHO) "clean: Clean all areas" | 696 @$(ECHO) "clean: Clean all areas" |
693 @$(ECHO) "export_product: Export product files to EXPORT_PATH" | 697 @$(ECHO) "export_product: Export product files to EXPORT_PATH" |
694 @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH" | 698 @$(ECHO) "export_fastdebug: Export fastdebug files to EXPORT_PATH" |
695 @$(ECHO) "export_debug: Export debug files to EXPORT_PATH" | 699 @$(ECHO) "export_debug: Export debug files to EXPORT_PATH" |
778 @$(ECHO) \ | 782 @$(ECHO) \ |
779 " $(MAKE) all" | 783 " $(MAKE) all" |
780 @$(ECHO) \ | 784 @$(ECHO) \ |
781 " $(MAKE) world" | 785 " $(MAKE) world" |
782 @$(ECHO) \ | 786 @$(ECHO) \ |
783 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)" | 787 " $(MAKE) ALT_BOOTDIR=/opt/java/jdk$(PREVIOUS_JDK_VERSION)" |
784 @$(ECHO) \ | 788 @$(ECHO) \ |
785 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)" | 789 " $(MAKE) ALT_JDK_IMPORT_PATH=/opt/java/jdk$(JDK_VERSION)" |
786 | 790 |
787 # Universal build support | 791 # Universal build support |
788 ifeq ($(OS_VENDOR), Darwin) | 792 ifeq ($(OS_VENDOR), Darwin) |
789 ifeq ($(MACOSX_UNIVERSAL),true) | 793 ifeq ($(MACOSX_UNIVERSAL),true) |
790 include $(GAMMADIR)/make/$(OSNAME)/makefiles/universal.gmk | 794 include $(GAMMADIR)/make/$(OSNAME)/makefiles/universal.gmk |
791 endif | 795 endif |
792 endif | 796 endif |
797 | |
798 # Compatibility for transition to new naming | |
799 warn_jvmg_deprecated: | |
800 echo "Warning: The jvmg target has been replaced with debug" | |
801 echo "Warning: Please update your usage" | |
802 | |
803 jvmg: warn_jvmg_deprecated debug | |
804 | |
805 jvmg1: warn_jvmg_deprecated debug1 | |
806 | |
807 jvmgminimal1: warn_jvmg_deprecated debugminimal1 | |
808 | |
809 jvmgcore: warn_jvmg_deprecated debugcore | |
810 | |
811 jvmgzero: warn_jvmg_deprecated debugzero | |
812 | |
813 jvmgshark: warn_jvmg_deprecated debugshark | |
814 | |
815 jvmggraal: warn_jvmg_deprecated debuggraal | |
793 | 816 |
794 # JPRT rule to build this workspace | 817 # JPRT rule to build this workspace |
795 include $(GAMMADIR)/make/jprt.gmk | 818 include $(GAMMADIR)/make/jprt.gmk |
796 | 819 |
797 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ | 820 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \ |