From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DQLE1-0005iL-7Q for qemu-devel@nongnu.org; Tue, 26 Apr 2005 04:15:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DQLDw-0005hz-41 for qemu-devel@nongnu.org; Tue, 26 Apr 2005 04:15:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQLDt-0005c5-1u for qemu-devel@nongnu.org; Tue, 26 Apr 2005 04:15:13 -0400 Received: from [202.172.235.150] (helo=datalex.com.sg) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DQLFA-0005fH-HA for qemu-devel@nongnu.org; Tue, 26 Apr 2005 04:16:32 -0400 Message-ID: <426DF7EB.6040508@tusker.org> Date: Tue, 26 Apr 2005 16:12:27 +0800 From: Damien Mascord MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020005030202060805090303" Subject: [Qemu-devel] [PATCH] Windows compile patch Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------020005030202060805090303 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 --------------020005030202060805090303 Content-Type: text/plain; name="win32compile.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="win32compile.patch" --- 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 --------------020005030202060805090303--