Mercurial > hg > graal-jvmci-8
comparison make/Makefile @ 8212:ed3fa3ae7b61
applied patch to Makefile system for building graal.jar (CR-102)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 11 Mar 2013 18:57:12 +0100 |
parents | 5fc51c1ecdeb |
children | a7d3f7b5b462 |
comparison
equal
deleted
inserted
replaced
8205:9efef773f521 | 8212:ed3fa3ae7b61 |
---|---|
82 ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR) | 82 ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR) |
83 else | 83 else |
84 ALT_OUT= | 84 ALT_OUT= |
85 endif | 85 endif |
86 | 86 |
87 # Directory for shared code (e.g. graal.jar) | |
88 SHARED_DIR=$(OUTPUTDIR)/shared | |
89 | |
87 # Typical C1/C2 targets made available with this Makefile | 90 # Typical C1/C2 targets made available with this Makefile |
88 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 | 91 C1_VM_TARGETS=product1 fastdebug1 optimized1 jvmg1 |
89 C2_VM_TARGETS=product fastdebug optimized jvmg | 92 C2_VM_TARGETS=product fastdebug optimized jvmg |
90 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero | 93 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero |
91 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark | 94 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark |
185 $(GRAAL_VM_TARGETS): | 188 $(GRAAL_VM_TARGETS): |
186 $(CD) $(GAMMADIR)/make; \ | 189 $(CD) $(GAMMADIR)/make; \ |
187 $(MAKE) VM_TARGET=$@ generic_buildgraal $(ALT_OUT) | 190 $(MAKE) VM_TARGET=$@ generic_buildgraal $(ALT_OUT) |
188 | 191 |
189 # Build compiler1 (client) rule, different for platforms | 192 # Build compiler1 (client) rule, different for platforms |
190 generic_build1: | 193 generic_build1: buildshared |
191 $(MKDIR) -p $(OUTPUTDIR) | 194 $(MKDIR) -p $(OUTPUTDIR) |
192 ifeq ($(OSNAME),windows) | 195 ifeq ($(OSNAME),windows) |
193 ifeq ($(ARCH_DATA_MODEL), 32) | 196 ifeq ($(ARCH_DATA_MODEL), 32) |
194 $(CD) $(OUTPUTDIR); \ | 197 $(CD) $(OUTPUTDIR); \ |
195 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ | 198 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ |
206 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | 209 $(MAKE) -f $(ABS_OS_MAKEFILE) \ |
207 $(MAKE_ARGS) $(VM_TARGET) | 210 $(MAKE_ARGS) $(VM_TARGET) |
208 endif | 211 endif |
209 | 212 |
210 # Build compiler2 (server) rule, different for platforms | 213 # Build compiler2 (server) rule, different for platforms |
211 generic_build2: | 214 generic_build2: buildshared |
212 $(MKDIR) -p $(OUTPUTDIR) | 215 $(MKDIR) -p $(OUTPUTDIR) |
213 ifeq ($(OSNAME),windows) | 216 ifeq ($(OSNAME),windows) |
214 $(CD) $(OUTPUTDIR); \ | 217 $(CD) $(OUTPUTDIR); \ |
215 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ | 218 $(NMAKE) -f $(ABS_OS_MAKEFILE) \ |
216 Variant=compiler2 \ | 219 Variant=compiler2 \ |
255 endif | 258 endif |
256 else | 259 else |
257 @$(ECHO) "Error: trying to build a minimal target but JVM_VARIANT_MINIMAL1 is not true." | 260 @$(ECHO) "Error: trying to build a minimal target but JVM_VARIANT_MINIMAL1 is not true." |
258 endif | 261 endif |
259 | 262 |
260 generic_buildgraal: | 263 generic_buildgraal: buildshared |
261 $(MKDIR) -p $(OUTPUTDIR) | 264 $(MKDIR) -p $(OUTPUTDIR) |
262 $(CD) $(OUTPUTDIR); \ | 265 $(CD) $(OUTPUTDIR); \ |
263 $(MAKE) -f $(ABS_OS_MAKEFILE) \ | 266 $(MAKE) -f $(ABS_OS_MAKEFILE) \ |
264 $(MAKE_ARGS) $(VM_TARGET) | 267 $(MAKE_ARGS) $(VM_TARGET) |
268 | |
269 # Builds code that can be shared among different build flavors | |
270 buildshared: | |
271 $(REMOTE) $(ANT) -f $(GAMMADIR)/make/build-graal.xml -Dgamma.dir=$(GAMMADIR) -Dshared.dir=$(SHARED_DIR) | |
265 | 272 |
266 # Export file rule | 273 # Export file rule |
267 generic_export: $(EXPORT_LIST) | 274 generic_export: $(EXPORT_LIST) |
268 export_product: | 275 export_product: |
269 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ | 276 $(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ |
384 $(install-file) | 391 $(install-file) |
385 | 392 |
386 # Shared Library | 393 # Shared Library |
387 ifneq ($(OSNAME),windows) | 394 ifneq ($(OSNAME),windows) |
388 ifeq ($(JVM_VARIANT_SERVER), true) | 395 ifeq ($(JVM_VARIANT_SERVER), true) |
396 # C2 | |
389 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) | 397 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) |
390 $(install-file) | 398 $(install-file) |
391 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) | 399 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) |
392 $(install-file) | 400 $(install-file) |
393 $(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) | 401 $(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) |
402 $(install-file) | 410 $(install-file) |
403 $(EXPORT_SERVER_DIR)/%.diz: $(C2_DIR)/%.diz | 411 $(EXPORT_SERVER_DIR)/%.diz: $(C2_DIR)/%.diz |
404 $(install-file) | 412 $(install-file) |
405 $(EXPORT_SERVER_DIR)/64/%.diz: $(C2_DIR)/%.diz | 413 $(EXPORT_SERVER_DIR)/64/%.diz: $(C2_DIR)/%.diz |
406 $(install-file) | 414 $(install-file) |
407 endif | 415 |
416 # Graal | |
417 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(GRAAL_DIR)/%.$(LIBRARY_SUFFIX) | |
418 $(install-file) | |
419 $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(GRAAL_DIR)/%.$(LIBRARY_SUFFIX) | |
420 $(install-file) | |
421 $(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(GRAAL_DIR)/%.$(LIBRARY_SUFFIX) | |
422 $(install-file) | |
423 $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(GRAAL_DIR)/%.debuginfo | |
424 $(install-file) | |
425 $(EXPORT_SERVER_DIR)/%.debuginfo: $(GRAAL_DIR)/%.debuginfo | |
426 $(install-file) | |
427 $(EXPORT_SERVER_DIR)/64/%.debuginfo: $(GRAAL_DIR)/%.debuginfo | |
428 $(install-file) | |
429 $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(GRAAL_DIR)/%.diz | |
430 $(install-file) | |
431 $(EXPORT_SERVER_DIR)/%.diz: $(GRAAL_DIR)/%.diz | |
432 $(install-file) | |
433 $(EXPORT_SERVER_DIR)/64/%.diz: $(GRAAL_DIR)/%.diz | |
434 $(install-file) | |
435 endif | |
408 ifeq ($(JVM_VARIANT_CLIENT), true) | 436 ifeq ($(JVM_VARIANT_CLIENT), true) |
409 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) | 437 $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) |
410 $(install-file) | 438 $(install-file) |
411 $(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) | 439 $(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) |
412 $(install-file) | 440 $(install-file) |
475 endif | 503 endif |
476 endif | 504 endif |
477 | 505 |
478 # Jar file (sa-jdi.jar) | 506 # Jar file (sa-jdi.jar) |
479 $(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar | 507 $(EXPORT_LIB_DIR)/%.jar: $(GEN_DIR)/%.jar |
508 $(install-file) | |
509 | |
510 # Shared jar files | |
511 $(EXPORT_JRE_LIB_DIR)/%.jar: $(SHARED_DIR)/%.jar | |
480 $(install-file) | 512 $(install-file) |
481 | 513 |
482 # Include files (jvmti.h, jvmticmlr.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h, jfr.h) | 514 # Include files (jvmti.h, jvmticmlr.h, jni.h, $(JDK_INCLUDE_SUBDIR)/jni_md.h, jmm.h, jfr.h) |
483 $(EXPORT_INCLUDE_DIR)/%: $(GEN_DIR)/jvmtifiles/% | 515 $(EXPORT_INCLUDE_DIR)/%: $(GEN_DIR)/jvmtifiles/% |
484 $(install-file) | 516 $(install-file) |
519 # | 551 # |
520 # Clean rules | 552 # Clean rules |
521 # | 553 # |
522 clobber clean: clean_build clean_export clean_jdk | 554 clobber clean: clean_build clean_export clean_jdk |
523 clean_build: | 555 clean_build: |
556 $(RM) -r $(SHARED_DIR) | |
524 $(RM) -r $(C1_DIR) | 557 $(RM) -r $(C1_DIR) |
525 $(RM) -r $(C2_DIR) | 558 $(RM) -r $(C2_DIR) |
526 $(RM) -r $(ZERO_DIR) | 559 $(RM) -r $(ZERO_DIR) |
527 $(RM) -r $(SHARK_DIR) | 560 $(RM) -r $(SHARK_DIR) |
528 $(RM) -r $(MINIMAL1_DIR) | 561 $(RM) -r $(MINIMAL1_DIR) |