summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-10-11 14:06:32 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-10-11 14:24:17 +0200
commit12712145bdf7dd2e2e6e0a2533b0dd40976b71b2 (patch)
treeeeb32ad5184550edbb7e937b6c2003d6b081aea2
parentdf487a49aba868050060808d1918958279d07ffa (diff)
downloadbarebox-12712145bdf7dd2e2e6e0a2533b0dd40976b71b2.tar.gz
barebox-12712145bdf7dd2e2e6e0a2533b0dd40976b71b2.tar.xz
sandbox: Fix stickypage.bin dependencies
stickypage.o is included in the build process once in arch/sandbox/board/Makefile using extra-y += stickypage.o and once again in arch/sandbox/Makefile using stickypage.bin: arch/sandbox/board/stickypage.o This doesn't work as expected. With parallel builds it can happen that the file is built twice confusing the build system. Create stickypage.bin in a single directory only. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/sandbox/Makefile7
-rw-r--r--arch/sandbox/board/Makefile7
2 files changed, 6 insertions, 8 deletions
diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index ba2614ea5f..5fc7e227be 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -75,10 +75,3 @@ common-y += $(BOARD) arch/sandbox/os/ arch/sandbox/lib/
common-$(CONFIG_OFTREE) += arch/sandbox/dts/
CLEAN_FILES += $(BOARD)/barebox.lds
-
-OBJCOPYFLAGS_stickypage.bin = -O binary
-
-stickypage.bin: arch/sandbox/board/stickypage.o
- $(call if_changed,objcopy)
-
-all: stickypage.bin
diff --git a/arch/sandbox/board/Makefile b/arch/sandbox/board/Makefile
index 59fece60ef..ed01cb9c3e 100644
--- a/arch/sandbox/board/Makefile
+++ b/arch/sandbox/board/Makefile
@@ -11,4 +11,9 @@ obj-$(CONFIG_LED) += led.o
extra-y += barebox.lds
-extra-y += stickypage.o
+extra-y += stickypage.bin
+
+OBJCOPYFLAGS_stickypage.bin = -O binary
+
+%.bin: %.o
+ $(call if_changed,objcopy)