forked from fwupd/fwupd-efi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
60 lines (50 loc) · 1.63 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
project('fwupd-efi', 'c',
version : '1.5',
license : 'LGPL-2.1+',
meson_version : '>=0.53.0',
default_options : ['warning_level=2', 'c_std=c99'],
)
conf = configuration_data()
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
cc = meson.get_compiler('c')
ld = cc.get_linker_id()
objcopy = find_program('objcopy')
objcopy_version = run_command(objcopy, '--version').stdout().split('\n')[0].split(' ')[-1]
prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
genpeimg = find_program ('genpeimg', required: false)
efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
host_cpu = host_machine.cpu_family()
if host_cpu == 'x86'
EFI_MACHINE_TYPE_NAME = 'ia32'
gnu_efi_arch = 'ia32'
elif host_cpu == 'x86_64'
EFI_MACHINE_TYPE_NAME = 'x64'
gnu_efi_arch = 'x86_64'
elif host_cpu == 'arm'
EFI_MACHINE_TYPE_NAME = 'arm'
gnu_efi_arch = 'arm'
elif host_cpu == 'aarch64'
EFI_MACHINE_TYPE_NAME = 'aa64'
gnu_efi_arch = 'aarch64'
else
error('Unknown host_cpu ' + host_cpu)
endif
# sanity check the packager set this to *SOMETHING*
if get_option('efi_sbat_distro_id') == ''
warning('-Defi_sbat_distro_id is unset, see README.md')
endif
configure_file(
output : 'config.h',
configuration : conf
)
pkgg = import('pkgconfig')
pkgg.generate(
version : meson.project_version(),
name : meson.project_name(),
filebase : 'fwupd-efi',
description : 'fwupd-efi is the UEFI binary used with fwupd for installing UEFI firmware updates',
)
fwupd_efi_dep = declare_dependency()
subdir('efi')