summaryrefslogtreecommitdiff
path: root/src/devices/wwan/meson.build
blob: e571cf94f85e295ef661f2fee4094d200e8f5f6d (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
sources = files(
  'nm-modem-broadband.c',
  'nm-modem.c',
  'nm-modem-manager.c'
)

deps = [
  libsystemd_dep,
  mm_glib_dep,
  nm_dep
]

if enable_ofono
  sources += files('nm-modem-ofono.c')
endif

symbol_name = join_paths(meson.current_source_dir(), 'libnm-wwan.ver')

ldflags = []
if have_version_script
  ldflags += '-Wl,--version-script,@0@'.format(symbol_name)
endif

libnm_wwan = shared_module(
  'nm-wwan',
  sources: sources,
  dependencies: deps,
  link_args: ldflags,
  link_depends: symbol_name,
  install: true,
  install_dir: nm_pkglibdir
)

libnm_wwan_dep = declare_dependency(
  include_directories: include_directories('.'),
  link_with: libnm_wwan
)

core_plugins += libnm_wwan

run_target(
  'check-wwan',
  command: [check_exports, libnm_wwan.full_path(), symbol_name],
  depends: libnm_wwan
)

sources = files(
  'nm-device-modem.c',
  'nm-wwan-factory.c'
)

deps += libnmdbus_dep

ldflags = []
if have_version_script
  ldflags += '-Wl,--version-script,@0@'.format(linker_script_devices)
endif

libnm_device_plugin_wwan = shared_module(
  'nm-device-plugin-wwan',
  sources: sources,
  dependencies: deps,
  link_with: libnm_wwan,
  link_args: ldflags,
  link_depends: linker_script_devices,
  install: true,
  install_dir: nm_pkglibdir
)

core_plugins += libnm_device_plugin_wwan

run_target(
  'check-local-devices-wwan',
  command: [check_exports, libnm_device_plugin_wwan.full_path(), linker_script_devices],
  depends: libnm_device_plugin_wwan
)

# FIXME: check_so_symbols replacement
'''
check-local-devices-wwan: src/devices/wwan/libnm-device-plugin-wwan.la src/devices/wwan/libnm-wwan.la
  $(srcdir)/tools/check-exports.sh $(builddir)/src/devices/wwan/.libs/libnm-device-plugin-wwan.so "$(srcdir)/linker-script-devices.ver"
  $(call check_so_symbols,$(builddir)/src/devices/wwan/.libs/libnm-device-plugin-wwan.so)
  $(srcdir)/tools/check-exports.sh $(builddir)/src/devices/wwan/.libs/libnm-wwan.so "$(srcdir)/src/devices/wwan/libnm-wwan.ver"
  $(call check_so_symbols,$(builddir)/src/devices/wwan/.libs/libnm-wwan.so)
'''