qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Damien Mascord <tusker@tusker.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Windows compile patch
Date: Tue, 26 Apr 2005 16:12:27 +0800	[thread overview]
Message-ID: <426DF7EB.6040508@tusker.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

Heya guys,

Here is a patch that allows compilation on MingW (Windows). [To allow
cygwin compilation, only the addition of -mno-cygwin on the CFLAGS will
suffice, as per http://www.h7.dion.ne.jp/~qemu-win/qemu-cygwin.txt].

Specifically it allows the console output on the command line (so,
executing qemu without any arguments shows usage), and specifies include
and lib paths to find zlib correctly.  This is adapted from
[http://lists.gnu.org/archive/html/qemu-devel/2004-07/msg00151.html].

Cheers,

Damien

[-- Attachment #2: win32compile.patch --]
[-- Type: text/plain, Size: 903 bytes --]

--- Makefile.orig	Sun Apr 24 01:42:13 2005
+++ Makefile	Tue Apr 26 16:03:56 2005
@@ -4,8 +4,14 @@
 ifdef CONFIG_DARWIN
 CFLAGS+= -mdynamic-no-pic
 endif
+ifdef CONFIG_WIN32
+CFLAGS+=-I/usr/local/include -I/usr/include
+endif
 LDFLAGS=-g
 LIBS=
+ifdef CONFIG_WIN32
+LIBS+=-lwinmm -lws2_32 -liphlpapi -mconsole -L/usr/local/lib -L/usr/lib
+endif
 DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 TOOLS=qemu-img$(EXESUF)
 ifdef CONFIG_STATIC
--- Makefile.target.orig	Sun Apr 24 02:25:40 2005
+++ Makefile.target	Tue Apr 26 16:03:56 2005
@@ -16,8 +16,14 @@
 endif
 CFLAGS=-Wall -O2 -g -fno-strict-aliasing
 #CFLAGS+=-Werror
+ifdef CONFIG_WIN32
+CFLAGS+=-I/usr/local/include -I/usr/include
+endif
 LDFLAGS=-g
 LIBS=
+ifdef CONFIG_WIN32
+LIBS+=-lwinmm -lws2_32 -liphlpapi -mconsole -L/usr/local/lib -L/usr/lib
+endif
 HELPER_CFLAGS=$(CFLAGS)
 DYNGEN=../dyngen$(EXESUF)
 # user emulator name

                 reply	other threads:[~2005-04-26  8:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=426DF7EB.6040508@tusker.org \
    --to=tusker@tusker.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).