qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] How to split vl.h


From: Blue Swirl
Subject: Re: [Qemu-devel] How to split vl.h
Date: Sun, 4 Nov 2007 10:48:17 +0200

On 11/1/07, Fabrice Bellard <address@hidden> wrote:
> Blue Swirl wrote:
> > Hi,
> >
> > With the automatic dependency rule installed, modifying vl.h causes
> > all files to be recompiled. This is of course the correct action, but
> > it's a major slowdown for development too.
>
> There must be an option in the Makefile to disable the automatic
> dependency check.
>
> > How should we split vl.h into smaller pieces? Give each device a
> > header file, like m48t59? What about other stuff exported from vl.c?
>
> The net result is that you will have dozens of header files with only
> one line in them as most devices only export one function.

I have another solution: include all architecture specific files from
the main file. This actually makes the compilation faster and the
resulting binary is smaller (maybe faster). Changing the architecture
specific code needs no changes to vl.h, just a recompile of sun4m.c,
but this is instantaneous on my machine. Automatic dependencies also
handle this case. I guess some may find this style pretty ugly.

Similar approach could be taken with the network adapters, sound
cards, Slirp (for the speed, not vl.h effect) etc. by introducing .c
files that include all the others.

Attachment: sun4m_include_code.diff
Description: Text Data


reply via email to

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