From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RloRJ-0001Xq-Rt for qemu-devel@nongnu.org; Fri, 13 Jan 2012 16:13:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RloRI-0008LB-MK for qemu-devel@nongnu.org; Fri, 13 Jan 2012 16:13:33 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:59366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RloRI-0008L5-Hi for qemu-devel@nongnu.org; Fri, 13 Jan 2012 16:13:32 -0500 Message-ID: <4F109E77.3030901@weilnetz.de> Date: Fri, 13 Jan 2012 22:13:27 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1324549207-23957-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1324549207-23957-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] w32: Build windows and console executables List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org Am 22.12.2011 11:20, schrieb Stefan Weil: > System emulation executables with SDL are typically windows > executables. Sometimes console executables are more useful, > so create both variants if linker option -mwindows was detected. > > v2: > This version uses QEMU_PROGW / QEMU_PROG instead of QEMU_PROG / QEMU_PROGC. > > Signed-off-by: Stefan Weil > --- > Makefile.target | 16 +++++++++++++++- > 1 files changed, 15 insertions(+), 1 deletions(-) > > diff --git a/Makefile.target b/Makefile.target > index 3261383..0182e41 100644 > --- a/Makefile.target > +++ b/Makefile.target > @@ -27,10 +27,17 @@ ifdef CONFIG_USER_ONLY > QEMU_PROG=qemu-$(TARGET_ARCH2) > else > # system emulator name > +ifneq (,$(findstring -mwindows,$(LIBS))) > +# Terminate program name with a 'w' because the linker builds a windows executable. > +QEMU_PROGW=qemu-system-$(TARGET_ARCH2)w$(EXESUF) > +endif # windows executable > QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF) > endif > > PROGS=$(QEMU_PROG) > +ifdef QEMU_PROGW > +PROGS+=$(QEMU_PROGW) > +endif > STPFILES= > > ifndef CONFIG_HAIKU > @@ -403,9 +410,16 @@ endif # CONFIG_LINUX_USER > > obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o > > +ifdef QEMU_PROGW > +# The linker builds a windows executable. Make also a console executable. > +$(QEMU_PROGW): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) > + $(call LINK,$^) > +$(QEMU_PROG): $(QEMU_PROGW) > + $(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROGW) $(QEMU_PROG)," GEN $(TARGET_DIR)$(QEMU_PROG)") > +else > $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y) > $(call LINK,$^) > - > +endif > > gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh > $(call quiet-command,rm -f $@&& $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") > Ping? All open questions were solved, so this patch can be committed. Thanks, Stefan W.