[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] w32: Build windows and console executables
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH] w32: Build windows and console executables |
Date: |
Thu, 22 Dec 2011 09:03:53 +0100 |
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
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
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, (continued)
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, Blue Swirl, 2011/12/11
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, TeLeMan, 2011/12/15
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, Stefan Weil, 2011/12/16
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, TeLeMan, 2011/12/18
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, Stefan Weil, 2011/12/19
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, TeLeMan, 2011/12/19
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, Andreas Färber, 2011/12/19
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, TeLeMan, 2011/12/21
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, Stefan Weil, 2011/12/22
- Re: [Qemu-devel] [PATCH] w32: QEMU applications with SDL are always GUI applications, TeLeMan, 2011/12/22
- [Qemu-devel] [PATCH] w32: Build windows and console executables,
Stefan Weil <=
- Re: [Qemu-devel] [PATCH] w32: Build windows and console executables, TeLeMan, 2011/12/22