[sw] Refactor exporting to only use BIN_DIR
We build code in the object directory (build-out, $OBJ_DIR), and then export it
into the bin directory (build-bin, $BIN_DIR). Within BIN_DIR, we
conventionally follow/mirror the directory structure in the source tree.
Before this patch we constructed the sub-directories $BIN_DIR/sw/host
and $BIN_DIR/sw/device in build_consts.sh, and passed them individually
to meson. After this patch, we only pass $BIN_DIR to meson, and let its
build logic figure out the rest.
This allows for a simplification in the meson logic without changing the
directory structure we produce.
The motivation for this change is the pending addition of the sw/otbn
directory, which would duplicate the same functionality for a third
time.
Signed-off-by: Philipp Wagner <phw@lowrisc.org>
diff --git a/sw/device/examples/hello_usbdev/meson.build b/sw/device/examples/hello_usbdev/meson.build
index 3b470cf..d1bb89d 100644
--- a/sw/device/examples/hello_usbdev/meson.build
+++ b/sw/device/examples/hello_usbdev/meson.build
@@ -37,7 +37,7 @@
custom_target(
'hello_usbdev_export_' + device_name,
- command: export_embedded_target,
+ command: export_target_command,
input: [hello_usbdev_elf, hello_usbdev_embedded],
output: 'hello_usbdev_export_' + device_name,
build_always_stale: true,