mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-28 15:33:42 +02:00
meson: link flashrom binary against static libflashrom
TEST: meson build && ninja -C build Read chip successfully with ch341a_spi programmer Change-Id: Ic522610f59e00299ebfa1bd29482ff92120ec52b Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/64030 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
963aaf55b3
commit
75c048b224
27
meson.build
27
meson.build
@ -425,7 +425,7 @@ include_dir = include_directories('include')
|
|||||||
|
|
||||||
mapfile = 'libflashrom.map'
|
mapfile = 'libflashrom.map'
|
||||||
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
||||||
flashrom = library(
|
libflashrom = both_libraries(
|
||||||
'flashrom',
|
'flashrom',
|
||||||
sources : [
|
sources : [
|
||||||
srcs,
|
srcs,
|
||||||
@ -455,7 +455,7 @@ endif
|
|||||||
|
|
||||||
pkgg = import('pkgconfig')
|
pkgg = import('pkgconfig')
|
||||||
pkgg.generate(
|
pkgg.generate(
|
||||||
libraries : flashrom,
|
libraries : libflashrom,
|
||||||
version : version,
|
version : version,
|
||||||
name : 'flashrom',
|
name : 'flashrom',
|
||||||
filebase : 'flashrom',
|
filebase : 'flashrom',
|
||||||
@ -472,31 +472,18 @@ configure_file(
|
|||||||
install_dir: join_paths(get_option('mandir'), 'man8'),
|
install_dir: join_paths(get_option('mandir'), 'man8'),
|
||||||
)
|
)
|
||||||
|
|
||||||
flashrom_dep = declare_dependency(
|
|
||||||
link_with : flashrom,
|
|
||||||
include_directories : include_dir,
|
|
||||||
dependencies : deps
|
|
||||||
)
|
|
||||||
|
|
||||||
# we can't just link_with libflashrom as we require all the internal symbols...
|
|
||||||
executable(
|
executable(
|
||||||
'flashrom',
|
'flashrom',
|
||||||
sources : [
|
files(
|
||||||
srcs,
|
|
||||||
'cli_classic.c',
|
'cli_classic.c',
|
||||||
'cli_common.c',
|
'cli_common.c',
|
||||||
'cli_output.c',
|
'cli_output.c',
|
||||||
'flashrom.c',
|
),
|
||||||
],
|
c_args : cargs,
|
||||||
include_directories : include_dir,
|
include_directories : include_dir,
|
||||||
dependencies : [
|
|
||||||
deps,
|
|
||||||
],
|
|
||||||
c_args : [
|
|
||||||
cargs
|
|
||||||
],
|
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : get_option('sbindir')
|
install_dir : get_option('sbindir'),
|
||||||
|
link_with : libflashrom.get_static_lib(), # flashrom needs internal symbols of libflashrom
|
||||||
)
|
)
|
||||||
|
|
||||||
subdir('util')
|
subdir('util')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user