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

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>
build: convert libhw to nested Makefile.objs

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

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>
build: move device tree to per-target Makefile.objs

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