qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] w32: Build windows and console executables


From: TeLeMan
Subject: Re: [Qemu-devel] [PATCH] w32: Build windows and console executables
Date: Thu, 22 Dec 2011 17:22:55 +0800

On Thu, Dec 22, 2011 at 16:03, Stefan Weil <address@hidden> wrote:
> 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.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
>  Makefile.target |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile.target b/Makefile.target
> index 3261383..489a80c 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -27,10 +27,19 @@ 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_PROG=qemu-system-$(TARGET_ARCH2)w$(EXESUF)
> +QEMU_PROGC=qemu-system-$(TARGET_ARCH2)$(EXESUF)
> +else # windows executable
>  QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
> +endif # windows executable
>  endif
I prefer QEMU_PROG & QEMU_PROGW.

>  PROGS=$(QEMU_PROG)
> +ifdef QEMU_PROGC
> +PROGS+=$(QEMU_PROGC)
> +endif
>  STPFILES=
>
>  ifndef CONFIG_HAIKU
> @@ -406,6 +415,11 @@ obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
>  $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
>        $(call LINK,$^)
>
> +ifdef QEMU_PROGC
> +# The linker built a windows executable. Make also a console executable.
> +$(QEMU_PROGC): $(QEMU_PROG)
> +       $(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROG) 
> $(QEMU_PROGC),"  GEN   $(QEMU_PROGC)")
> +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)$@")
> --
> 1.7.0.4
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]