I'd like to have directory tree containing only the files used by a specific Linux build.
For example if I use https://github.com/LineageOS/android_kernel_moto_shamu with make shamu_defconfig; make
that'd result in the Makefile system using the includes in the buildconfig to build.
Is there an (easy) way to have the Makefile system save the files it uses to a log, or most preferably to a different directory such that I'm left with a folder that contains only the files that're used for a build.
My goal is to be able to easily determine which code for the peripherals (e.g. touchscreen driver) is used.
Thanks