Fix out-of-tree build
Adding AArch32 support to the boot-wrapper changed the source layout and
broke out-of-tree build. This patch allows to put all generated files
into a separate directory again, and build multiple images in parallel:
mkdir build/ && cd build/
Make attempts to output object files into build/arch/aarchXX/, but fails
because that folder doesn't exist in the build directory. Add mkdir as
prerequisite for any *.o target in the arch folder.
So that Make doesn't confuse the destination folder with the source,
override VPATH to only affect .S and .c sources.
And set $(ARCH_SRC) as order-only-prerequisite (after a '|'). Otherwise
Make would rebuild all objects whenever the timestamp of $(ARCH_SRC)
changes, which is every time an object is rebuilt...
Signed-off-by: Jean-Philippe Brucker <email@example.com>
Signed-off-by: Mark Rutland <firstname.lastname@example.org>
1 file changed