build: remove trace-nested-y

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: 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>
build: 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>
build: move *-user/ objects to nested Makefile.objs

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

Also drop duplicate occurrence of device-hotplug.o.

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

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
dump: do not compile dump.o for user-mode emulation

It is not needed, because the monitor is not included.

Cc: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
dump: change cpu_get_note_size to return ssize_t

So that it can use the same prototype in both cases.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
dump: remove dumping stuff from cpu-all.h

This simplifies things, because they will only be included for softmmu
targets and because the stubs are taken out-of-line in separate files,
which in the future could even be compiled only once.

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

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: 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>
build: adapt qom/Makefile and move it to Makefile.objs

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>
build: move block/ objects to nested Makefile.objs

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

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

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

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

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

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

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

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