summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 7 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 1a36df887..02dedfcf9 100644
--- a/meson.build
+++ b/meson.build
@@ -29,6 +29,13 @@ add_project_arguments('-D_POSIX_C_SOURCE=200809L', language : 'c') # required fo
add_project_arguments('-D_BSD_SOURCE', language : 'c') # required for glibc < v2.19
add_project_arguments('-DFLASHROM_VERSION="' + meson.project_version() + '"', language : '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
+
# get defaults from configure
config_atahpt = get_option('config_atahpt')
config_atapromise = get_option('config_atapromise')