Thomas Heijligen has submitted this change. ( https://review.coreboot.org/c/flashrom/+/63826 )
Change subject: meson: use `platform/` as subdir() ......................................................................
meson: use `platform/` as subdir()
Move build instructions for files inside the `platform/` directory to `platform/meson.build`. This contains instructions to build `memaccess.c`, the right endian implementation and selecting the right legacy command line option for the endian.
The `platform/` directory should contain code that abstracts the underlying platform but is not involved in flashrom logic.
Change-Id: I88044a3f903f316138483dd872a6d95f8686ae69 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.com Reviewed-on: https://review.coreboot.org/c/flashrom/+/63826 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Anastasia Klimchuk aklm@chromium.org --- M meson.build A platform/meson.build 2 files changed, 13 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified Anastasia Klimchuk: Looks good to me, approved
diff --git a/meson.build b/meson.build index 56ff970..f9a0455 100644 --- a/meson.build +++ b/meson.build @@ -115,6 +115,8 @@ 'writeprotect_ranges.c', )
+subdir('platform') + host_is_x86 = ['x86', 'x86_64'].contains(host_machine.cpu_family())
need_serial = [ @@ -174,17 +176,6 @@ add_project_arguments('-DIS_WINDOWS=0', language : 'c') endif
-srcs += 'platform/memaccess.c' - -if host_machine.endian() == 'little' - srcs += 'platform/endian_little.c' - add_project_arguments('-D__FLASHROM_LITTLE_ENDIAN__=1', language : 'c') -endif -if host_machine.endian() == 'big' - srcs += 'platform/endian_big.c' - add_project_arguments('-D__FLASHROM_BIG_ENDIAN__=1', language : 'c') -endif - # some programmers require libusb if get_option('usb') srcs += 'usbdev.c' diff --git a/platform/meson.build b/platform/meson.build new file mode 100644 index 0000000..5a74cef --- /dev/null +++ b/platform/meson.build @@ -0,0 +1,11 @@ +srcs += files( + ('endian_' + host_machine.endian() + '.c'), + 'memaccess.c', +) + +if host_machine.endian() == 'little' + add_project_arguments('-D__FLASHROM_LITTLE_ENDIAN__=1', language : 'c') +endif +if host_machine.endian() == 'big' + add_project_arguments('-D__FLASHROM_BIG_ENDIAN__=1', language : 'c') +endif
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.