reboot-mode: put the build artifacts in ${B}

We should output the compiled executables into ${B} and install them
from it as well. Currently we put the build objects in the source
directory. While at it: don't assume we're already in the source
directory and instead prepend the source file with ${S}.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Bartosz Golaszewski 2023-03-31 14:31:53 +02:00 committed by Khem Raj
parent 55489e5d10
commit f6b3a82e1e

View File

@ -10,9 +10,9 @@ SRCREV = "84831b20512abd9033414ca5f5a023f333525335"
S = "${WORKDIR}/git"
do_compile() {
${CC} ${CFLAGS} ${LDFLAGS} reboot-mode.c -o reboot-mode
${CC} ${CFLAGS} ${LDFLAGS} ${S}/reboot-mode.c -o ${B}/reboot-mode
}
do_install() {
install -D -m 0755 ${S}/reboot-mode ${D}${bindir}/reboot-mode
install -D -m 0755 ${B}/reboot-mode ${D}${bindir}/reboot-mode
}