diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk index 60841a0a20d9..7858967eab88 100644 --- a/solenv/gbuild/Executable.mk +++ b/solenv/gbuild/Executable.mk @@ -60,7 +60,7 @@ $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)),$(call g endef define gb_Executable_set_targettype_gui -$(call gb_Executable_get_target,$(1)) : gb_Executable_TARGETGUI := $(2) +$(call gb_LinkTarget_get_target,Executable/$(1)$(gb_Executable_EXT)) : TARGETGUI := $(2) endef diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk index 688d53dc8e63..ae99f11780eb 100644 --- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk @@ -173,7 +173,7 @@ $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) && \ $(gb_CXX) $(strip \ $(gb_Executable_TARGETTYPEFLAGS) \ - $(if $(filter YES,$(gb_Executable_TARGETGUI)), -mwindows, -mconsole) \ + $(if $(filter YES,$(TARGETGUI)), -mwindows, -mconsole) \ $(T_LDFLAGS) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ @@ -393,8 +393,10 @@ gb_StaticLibrary_StaticLibrary_platform = gb_Executable_EXT := .exe gb_Executable_TARGETTYPEFLAGS := gb_Executable_get_rpath := -gb_Executable_Executable_platform = -gb_Executable_TARGETGUI := + +define gb_Executable_Executable_platform +$(call gb_LinkTarget_get_target,$(2)) : TARGETGUI := +endef # CppunitTest class diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk index 3051f5d1f407..7a562456d03c 100644 --- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk @@ -358,7 +358,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ $(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \ $(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \ - $(if $(filter YES,$(gb_Executable_TARGETGUI)), -SUBSYSTEM:WINDOWS, -SUBSYSTEM:CONSOLE) \ + $(if $(filter YES,$(TARGETGUI)), -SUBSYSTEM:WINDOWS, -SUBSYSTEM:CONSOLE) \ $(T_LDFLAGS) \ $(if $(gb_PRODUCT),,-NODEFAULTLIB) \ @$${RESPONSEFILE} \ @@ -548,7 +548,6 @@ gb_Executable_EXT := .exe gb_Executable_TARGETTYPEFLAGS := $(gb_Windows_PE_TARGETTYPEFLAGS) gb_Executable_get_rpath := -gb_Executable_TARGETGUI := define gb_Executable_Executable_platform $(call gb_LinkTarget_set_auxtargets,$(2),\ @@ -562,7 +561,8 @@ $(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS := $(call gb_Executable $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)).manifest,$(call gb_LinkTarget_get_target,$(2)).manifest,$(1)) $(call gb_LinkTarget_get_target,$(2)) \ -$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE = $(call gb_LinkTarget_get_pdbfile,$(2)) +$(call gb_LinkTarget_get_headers_target,$(2)) : PDBFILE := $(call gb_LinkTarget_get_pdbfile,$(2)) +$(call gb_LinkTarget_get_target,$(2)) : TARGETGUI := endef