Thomas Heijligen has uploaded this change for review.
meson: outsource platform specific code to `platform/meson.build`
Move the selection which code is build of the platform directory into
this.
Change-Id: I88044a3f903f316138483dd872a6d95f8686ae69
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
---
M meson.build
A platform/meson.build
2 files changed, 13 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/26/63826/1
diff --git a/meson.build b/meson.build
index f8ca1d3..61437f9 100644
--- a/meson.build
+++ b/meson.build
@@ -81,6 +81,8 @@
deps = []
srcs = []
+subdir('platform')
+
host_is_x86 = ['x86', 'x86_64'].contains(host_machine.cpu_family())
need_serial = [
@@ -135,17 +137,6 @@
add_project_arguments('-DHAVE_UTSNAME=1', 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..511347d
--- /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
\ No newline at end of file
To view, visit change 63826. To unsubscribe, or for help writing mail filters, visit settings.