remove trace-nested-y

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
do not sprinkle around GENERATED_HEADERS dependencies

Keeping GENERATED_HEADERS dependencies up-to-date everywhere is complex.
We can simply make the Makefile depend on them, and they will be built
before all other targets.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
add rules for nesting

This adds the 'magic' rules that take care of subdirectories.
The subdirectory makefiles in the source tree are not complete; they
only define some variables (listed in nested-vars) according to the
configuration.

The magic rules descend into subdirectory makefiles and gather the
evaluated values of those variables.  The values from all subdirectories
are joined together, each prefixed with the subdirectory name, and used
by the "real" makefiles.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move *-user/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move obj-TARGET-y variables to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move libobj-y variable to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move other target-*/ objects to nested Makefiles

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move rules for nesting to Makefile.objs

At this point we will start adding nesting behavior to other files
than Makefile.target.  Because Makefile.objs is included by
Makefile.target, it is simpler to move the processing of
subdirectories there.

To enable this, only add per-target files to obj-y.  Use a separate
variable for the linker dependencies, all-obj-y.  This variable includes
obj-y and also all objects that are taken from other directories.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
use nested Makefile rules for qom/ objects

qom/ already used a separate makefile.  Convert it to use relative
paths, and make it declare both common-obj-y and user-obj-y.  This
way, the upper makefiles do not need to know that some QOM files
are compiled twice.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move block/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move net/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move fsdev/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move ui/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move audio/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move slirp/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move qapi/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move qga/ objects to nested Makefile

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move target-independent hw/ objects to nested Makefiles

This patch starts converting the hw/ directory.  Some files in hw/
are compiled once, some twice (32-/64-bit), some once per target.
Each category is moved in a separate patch.

After this patch, the files that are compiled once will show the
same hierarchy in the build tree as they do in the source tree,
for example hw/qdev.o instead of just qdev.o.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
convert libhw to nested Makefiles

After this patch, the libhw* directories will have a hierarchy
that mimics the source tree.  This is useful because we do have
a couple of files there that are in the top source directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
move per-target hw/ objects to nested Makefiles

This completes the move to nested Makefiles for virtio and a few
other files that were not part of obj-TARGET-y, but still were
compiled separately for each target.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>