diff options
author | Thomas Heijligen <thomas.heijligen@secunet.de> | 2021-10-12 17:58:35 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-10-15 14:36:09 +0000 |
commit | 1379e54f519234c07b7e0995de84ab782581c552 (patch) | |
tree | 1f54911858840716722f02d604c2a828b4ff2db2 /meson.build | |
parent | c9d947576bad1854fe7899e9bccc22ce0e649554 (diff) | |
download | flashrom-1379e54f519234c07b7e0995de84ab782581c552.tar.gz flashrom-1379e54f519234c07b7e0995de84ab782581c552.tar.bz2 flashrom-1379e54f519234c07b7e0995de84ab782581c552.zip |
buildsystem: evaluate the USE_IOPL, USE_DEV_IO, USE_IOPERM macros
Determine which macro has to be set for the target system.
Do this in the buildsystem instead of using preprocessor macros.
Change-Id: Ic41ea025e35feb93f07ce7a94c0d15e6e84f38b9
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58278
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meson.build b/meson.build index a971a6a6..86657cef 100644 --- a/meson.build +++ b/meson.build @@ -42,6 +42,24 @@ else add_project_arguments('-DIS_WINDOWS=0', language : 'c') endif +if host_machine.system() in ['linux', 'darwin', 'netbsd', 'openbsd'] + add_project_arguments('-DUSE_IOPL=1', language : 'c') +else + add_project_arguments('-DUSE_IOPL=0', language : 'c') +endif + +if host_machine.system() in ['freebsd', 'dragonfly'] + add_project_arguments('-DUSE_DEV_IO=1', language : 'c') +else + add_project_arguments('-DUSE_DEV_IO=0', language : 'c') +endif + +if host_machine.system() in ['gnu'] + add_project_arguments('-DUSE_IOPERM=1', language : 'c') +else + add_project_arguments('-DUSE_IOPERM=0', language : 'c') +endif + # get defaults from configure config_atahpt = get_option('config_atahpt') config_atapromise = get_option('config_atapromise') |