build system: create proper dependency files

Tell gcc what to use as target part of the generated rule.

This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.

Change-Id: Ie4814143337abb3cf1e9e8db7e96201a517a17b8
Signed-off-by: Patrick Georgi <>
Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
Based-On-Signed-off-by: Julius Werner <>
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <>
Reviewed-by: Stefan Reinauer <>
1 file changed