mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +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'
|
||||
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
|
||||
flashrom = library(
|
||||
libflashrom = both_libraries(
|
||||
'flashrom',
|
||||
sources : [
|
||||
srcs,
|
||||
@ -455,7 +455,7 @@ endif
|
||||
|
||||
pkgg = import('pkgconfig')
|
||||
pkgg.generate(
|
||||
libraries : flashrom,
|
||||
libraries : libflashrom,
|
||||
version : version,
|
||||
name : 'flashrom',
|
||||
filebase : 'flashrom',
|
||||
@ -472,31 +472,18 @@ configure_file(
|
||||
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(
|
||||
'flashrom',
|
||||
sources : [
|
||||
srcs,
|
||||
files(
|
||||
'cli_classic.c',
|
||||
'cli_common.c',
|
||||
'cli_output.c',
|
||||
'flashrom.c',
|
||||
],
|
||||
),
|
||||
c_args : cargs,
|
||||
include_directories : include_dir,
|
||||
dependencies : [
|
||||
deps,
|
||||
],
|
||||
c_args : [
|
||||
cargs
|
||||
],
|
||||
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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user