mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-04 15:25:17 +02:00

Change-Id: I9910cd1f5850a6f86e26bb1dc4ff26614f0a0964 Signed-off-by: Antonio Vázquez Blanco <antoniovazquezblanco@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/88270 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
52 lines
1.5 KiB
Meson
52 lines
1.5 KiB
Meson
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
|
|
|
|
# Select an appropriate delay implementation for the target OS
|
|
delay_src = files('udelay.c')
|
|
if target_machine.system() == 'dos'
|
|
delay_src = files('udelay_dos.c')
|
|
endif
|
|
srcs += delay_src
|
|
cargs += ['-DCONFIG_DELAY_MINIMUM_SLEEP_US=@0@'.format(
|
|
get_option('delay_minimum_sleep_us')
|
|
)]
|
|
|
|
# OpenBSD requires libi386 or libamd64 for I/O port handling
|
|
if host_machine.system() == 'openbsd'
|
|
if host_machine.cpu_family() == 'x86'
|
|
libi386 = cc.find_library('i386')
|
|
deps += libi386
|
|
elif host_machine.cpu_family() == 'x86_64'
|
|
libamd64 = cc.find_library('amd64')
|
|
deps += libamd64
|
|
endif
|
|
endif
|
|
|
|
# NetBSD requires libx86 or libx86_64 for I/O port handling
|
|
if host_machine.system() == 'netbsd'
|
|
if host_machine.cpu_family() == 'x86'
|
|
libx86 = cc.find_library('x86')
|
|
deps += libx86
|
|
elif host_machine.cpu_family() == 'x86_64'
|
|
libx86_64 = cc.find_library('x86_64')
|
|
deps += libx86_64
|
|
endif
|
|
endif
|
|
|
|
# SunOS requires external libraries for network sockets
|
|
# they are used to support serial devices via network
|
|
if host_machine.system() == 'sunos'
|
|
libsocket = cc.find_library('socket')
|
|
libnsl = cc.find_library('nsl')
|
|
deps += [ libsocket, libnsl]
|
|
endif
|