From b0aec45d8c9027c2fca52254a1e437036547a0d0 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Mon, 25 Apr 2022 14:42:17 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/63826 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk --- platform/meson.build | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 platform/meson.build (limited to 'platform/meson.build') diff --git a/platform/meson.build b/platform/meson.build new file mode 100644 index 00000000..5a74cef7 --- /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 -- cgit v1.2.3