437 $(TOUCH) $$@ |
437 $(TOUCH) $$@ |
438 |
438 |
439 # Now call add_native_source for each source file we are going to compile. |
439 # Now call add_native_source for each source file we are going to compile. |
440 $$(foreach p,$$($1_SRCS), \ |
440 $$(foreach p,$$($1_SRCS), \ |
441 $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \ |
441 $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \ |
442 $(SYSROOT_CFLAGS) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \ |
442 $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $(SYSROOT_CFLAGS), \ |
443 $(SYSROOT_CFLAGS) $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$$($1_CXX),$$($1_OBJC),$$($1_ASFLAGS)))) |
443 $$($1_CC), \ |
|
444 $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $(SYSROOT_CFLAGS), \ |
|
445 $$($1_CXX),$$($1_OBJC),$$($1_ASFLAGS)))) |
444 |
446 |
445 # On windows we need to create a resource file |
447 # On windows we need to create a resource file |
446 ifeq ($(OPENJDK_TARGET_OS), windows) |
448 ifeq ($(OPENJDK_TARGET_OS), windows) |
447 ifneq (,$$($1_VERSIONINFO_RESOURCE)) |
449 ifneq (,$$($1_VERSIONINFO_RESOURCE)) |
448 $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res |
450 $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res |
574 $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX) |
576 $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX) |
575 |
577 |
576 $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \ |
578 $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \ |
577 $$($1_DEBUGINFO_EXTRA_DEPS) |
579 $$($1_DEBUGINFO_EXTRA_DEPS) |
578 $$(call LINKING_MSG,$$($1_BASENAME)) |
580 $$(call LINKING_MSG,$$($1_BASENAME)) |
579 $$($1_LD) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \ |
581 $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(SYSROOT_LDFLAGS) \ |
580 $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \ |
582 $(LD_OUT_OPTION)$$@ \ |
581 $$($1_EXTRA_LDFLAGS_SUFFIX) |
583 $$($1_EXPECTED_OBJS) $$($1_RES) \ |
|
584 $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) |
582 $$($1_CREATE_DEBUGINFO_CMDS) |
585 $$($1_CREATE_DEBUGINFO_CMDS) |
583 # Touch target to make sure it has a later time stamp than the debug |
586 # Touch target to make sure it has a later time stamp than the debug |
584 # symbol files to avoid unnecessary relinking on rebuild. |
587 # symbol files to avoid unnecessary relinking on rebuild. |
585 ifeq ($(OPENJDK_TARGET_OS), windows) |
588 ifeq ($(OPENJDK_TARGET_OS), windows) |
586 $(TOUCH) $$@ |
589 $(TOUCH) $$@ |
601 $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX) |
604 $1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX) |
602 |
605 |
603 $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST) \ |
606 $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST) \ |
604 $$($1_DEBUGINFO_EXTRA_DEPS) |
607 $$($1_DEBUGINFO_EXTRA_DEPS) |
605 $$(call LINKING_EXE_MSG,$$($1_BASENAME)) |
608 $$(call LINKING_EXE_MSG,$$($1_BASENAME)) |
606 $$($1_LDEXE) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \ |
609 $$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(SYSROOT_LDFLAGS) \ |
607 $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \ |
610 $(EXE_OUT_OPTION)$$($1_TARGET) \ |
608 $$($1_EXTRA_LDFLAGS_SUFFIX) |
611 $$($1_EXPECTED_OBJS) $$($1_RES) \ |
|
612 $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) |
609 ifneq (,$$($1_GEN_MANIFEST)) |
613 ifneq (,$$($1_GEN_MANIFEST)) |
610 $(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1 |
614 $(MT) -nologo -manifest $$($1_GEN_MANIFEST) -outputresource:$$@;#1 |
611 endif |
615 endif |
612 # This only works if the openjdk_codesign identity is present on the system. Let |
616 # This only works if the openjdk_codesign identity is present on the system. Let |
613 # silently fail otherwise. |
617 # silently fail otherwise. |