summaryrefslogtreecommitdiff
path: root/src/devices/wwan/meson.build
blob: 5fe6e433e40f81e0841ba6dd3864a6346b9c5f32 (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
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

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

libnm_wwan = shared_module(
  'nm-wwan',
  sources: sources,
  dependencies: deps,
  link_args: [
    '-Wl,--version-script,@0@'.format(linker_script),
  ],
  link_depends: linker_script,
  install: true,
  install_dir: nm_plugindir
)

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

core_plugins += libnm_wwan

test(
  'check-wwan',
  check_exports,
  args: [libnm_wwan.full_path(), linker_script],
)

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

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

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)
'''