Skip to content
  • Jean-Philippe Brucker's avatar
    Fix subfolder dependency generation · 665f1b72
    Jean-Philippe Brucker authored
    
    
    When building an object "foo.o", kvmtool also creates a ".foo.o.d" file,
    using the dependency generation feature of CPP. This file describes in
    Makefile format all headers included by foo.c. When one header is
    modified, make rebuilds all objects that include it.
    
    Dependency files in subfolders are currently ignored by make, because
    the target doesn't contain the right prefix. For example virtio/.blk.o.d
    has target "blk.o" instead of "virtio/blk.o". As a result, rebuilding
    kvmtool without first issuing a make clean can introduce sneaky bugs,
    where different objects use mismatched headers. To write the right
    targets in dependency files, add a -MT argument to CPP.
    
    Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    665f1b72