build: set ALL_OBJS in main Makefile; move prelink.o to main Makefile
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 18 Feb 2022 07:57:03 +0000 (08:57 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 18 Feb 2022 07:57:03 +0000 (08:57 +0100)
commit8fd1aeb8f486523af218632b19cac7519d923f45
tree7bc47420694364f0bdb0676bae852d22e0fd704e
parent4ec51e87804bd9aad0d0b8e5dadb987b54c5adeb
build: set ALL_OBJS in main Makefile; move prelink.o to main Makefile

This is to avoid arch/$arch/Makefile having to recurse into parents
directories.

This avoid duplication of the logic to build prelink.o between arches.

In order to do that, we cut the $(TARGET) target in the main Makefile in
two, there is a "prepare" phase/target runned before starting to build
"prelink.o" which will prepare "include/" among other things, then all
the $(ALL_OBJS) will be generated in order to build "prelink.o" and
finally $(TARGET) will be generated by calling into "arch/*/" to make
$(TARGET).

Now we don't need to prefix $(ALL_OBJS) with $(BASEDIR) as it is now
only used from the main Makefile. Other changes is to use "$<" instead
of spelling "prelink.o" in the target "$(TARGET)" in both
arch/*/Makefile.

Beside "prelink.o" been at a different location, no other functional
change intended.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/Makefile
xen/Rules.mk
xen/arch/arm/Makefile
xen/arch/arm/Rules.mk
xen/arch/arm/arch.mk
xen/arch/x86/Makefile
xen/arch/x86/arch.mk
xen/build.mk