Thomas Heijligen has uploaded this change for review.

View Change

meson: link flashrom binary against static libflashrom

Change-Id: Ic522610f59e00299ebfa1bd29482ff92120ec52b
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
---
M meson.build
1 file changed, 11 insertions(+), 21 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/30/64030/1
diff --git a/meson.build b/meson.build
index 3018c17..dbee971 100644
--- a/meson.build
+++ b/meson.build
@@ -7,7 +7,9 @@
'c_std=c99',
'werror=true',
'optimization=s',
- 'debug=false'],
+ 'debug=false',
+ 'default_library=both',
+ ],
)

# libtool versioning
@@ -425,8 +427,8 @@

mapfile = 'libflashrom.map'
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
-flashrom = library(
- 'flashrom',
+libflashrom = library(
+ 'libflashrom',
sources : [
srcs,
],
@@ -455,7 +457,7 @@

pkgg = import('pkgconfig')
pkgg.generate(
- libraries : flashrom,
+ libraries : libflashrom,
version : version,
name : 'flashrom',
filebase : 'flashrom',
@@ -472,31 +474,19 @@
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')

To view, visit change 64030. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic522610f59e00299ebfa1bd29482ff92120ec52b
Gerrit-Change-Number: 64030
Gerrit-PatchSet: 1
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-MessageType: newchange