aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2022-04-25 14:42:17 +0200
committerThomas Heijligen <src@posteo.de>2022-05-12 08:52:40 +0000
commitb0aec45d8c9027c2fca52254a1e437036547a0d0 (patch)
treec690cbe810d077ddff6920b48d19e1c2a2b3880e /meson.build
parent758f02b093cd422745022a9da4c7922c38170886 (diff)
downloadflashrom-b0aec45d8c9027c2fca52254a1e437036547a0d0.tar.gz
flashrom-b0aec45d8c9027c2fca52254a1e437036547a0d0.tar.bz2
flashrom-b0aec45d8c9027c2fca52254a1e437036547a0d0.zip
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>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 2 insertions, 11 deletions
diff --git a/meson.build b/meson.build
index 56ff9706..f9a0455d 100644
--- a/meson.build
+++ b/meson.build
@@ -115,6 +115,8 @@ srcs = files(
'writeprotect_ranges.c',
)
+subdir('platform')
+
host_is_x86 = ['x86', 'x86_64'].contains(host_machine.cpu_family())
need_serial = [
@@ -174,17 +176,6 @@ else
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'