Resolve unused warning.
Exclude files from object libraries.

They are handled separately.
Merge topic 'target-sources-refactor' into next

d36d47b7 Exclude files from object libraries.
e8e683a0 Resolve unused warning.