From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IojCi-0006Ij-D9 for qemu-devel@nongnu.org; Sun, 04 Nov 2007 12:24:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IojCe-0006IF-Nu for qemu-devel@nongnu.org; Sun, 04 Nov 2007 12:24:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IojCe-0006IC-LW for qemu-devel@nongnu.org; Sun, 04 Nov 2007 12:24:04 -0500 Received: from bangui.magic.fr ([195.154.194.245]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IojCd-0000p7-SG for qemu-devel@nongnu.org; Sun, 04 Nov 2007 12:24:04 -0500 Subject: Re: [Qemu-devel] How to split vl.h From: "J. Mayer" In-Reply-To: <200711041217.08102.paul@codesourcery.com> References: <4729B592.5080006@bellard.org> <200711041217.08102.paul@codesourcery.com> Content-Type: text/plain Date: Sun, 04 Nov 2007 18:23:57 +0100 Message-Id: <1194197037.31210.29.camel@rapid> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 Cc: Blue Swirl , Paul Brook On Sun, 2007-11-04 at 12:17 +0000, Paul Brook wrote: > > I have another solution: include all architecture specific files from > > the main file. > > I'd really rather not do this. I doubt it's going to be a win, as now you have > to recompile the whole thing every time you change the implementation. At > least with vl.h you only have to recompile when you change the interface. What I feel about this is that adding a hw/hw.h, included in all hw/*.c files would greatly improve the situation: changing vl.h would lead to recompile the core emulator object files, changing hw/hw.h would lead to recompile the hardware library. A first pass to do this could be achieved with a minimal effort, just moving all prototypes and structure definitions that could be moved without having to change vl.c. Then, things could be refined to move some hardware specific stuffs from vl.c to hw subdirectory: for example, the USB or display registration functions could go in a file in hw which would avoid USBDevice or DisplayState to be defined globally. -- J. Mayer Never organized