2 plugin_cflags = -fvisibility=hidden -I$(srcdir)/gdbus \
3 @DLOG_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@
4 plugin_ldflags = -no-undefined -module -avoid-version
7 builtin_modules += loopback
8 builtin_sources += plugins/loopback.c
12 builtin_modules += ethernet
13 builtin_sources += plugins/ethernet.c
17 builtin_modules += gadget
18 builtin_sources += plugins/gadget.c
21 gsupplicant_sources = gsupplicant/gsupplicant.h gsupplicant/dbus.h \
22 gsupplicant/supplicant.c gsupplicant/dbus.c
25 builtin_modules += wifi
26 builtin_sources += plugins/wifi.c $(gsupplicant_sources)
30 builtin_modules += iwd
31 builtin_sources += plugins/iwd.c
35 builtin_modules += bluetooth
36 builtin_sources += plugins/bluetooth.c
40 if HH2SERIAL_GPS_BUILTIN
41 builtin_modules += hh2serial_gps
42 builtin_sources += plugins/hh2serial-gps.c
44 plugin_LTLIBRARIES += plugins/hh2serial-gps.la
45 plugin_objects += $(plugins_hh2serial_gps_la_OBJECTS)
46 plugins_hh2serial_gps_la_CFLAGS = $(plugin_cflags)
47 plugins_hh2serial_gps_la_LDFLAGS = $(plugin_ldflags)
52 builtin_modules += ofono
53 builtin_sources += plugins/mcc.h plugins/ofono.c
57 builtin_modules += dundee
58 builtin_sources += plugins/dundee.c
63 builtin_modules += telephony
64 builtin_sources += plugins/telephony.c
66 plugin_LTLIBRARIES += plugins/telephony.la
67 plugin_objects += $(plugins_telephony_la_OBJECTS)
68 plugins_telephony_la_CFLAGS = $(plugin_cflags)
69 plugins_telephony_la_LDFLAGS = $(plugin_ldflags)
74 builtin_modules += vpn
75 builtin_sources += plugins/vpn.c
78 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
80 builtin_vpn_modules += wireguard
81 builtin_vpn_sources += src/shared/mnlg.h src/shared/mnlg.c \
82 vpn/plugins/wireguard.h vpn/plugins/libwireguard.c \
83 vpn/plugins/wireguard.c
84 builtin_vpn_cflags += @LIBMNL_CFLAGS@ -DWIREGUARD=\"@WIREGUARD@\"
85 builtin_vpn_libadd += @LIBMNL_LIBS@
87 vpn_plugin_LTLIBRARIES += vpn/plugins/wireguard.la
88 vpn_plugin_objects += $(plugins_wireguard_la_OBJECTS)
89 vpn_plugins_wireguard_la_SOURCES = src/shared/mnlg.h src/shared/mnlg.c \
90 vpn/plugins/wireguard.h \
91 vpn/plugins/libwireguard.c \
92 vpn/plugins/wireguard.c
93 vpn_plugins_wireguard_la_CFLAGS = $(plugin_cflags) @LIBMNL_CFLAGS@ \
94 -DWIREGUARD=\"@WIREGUARD@\" \
95 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
96 -DSCRIPTDIR=\""$(build_scriptdir)"\"
97 vpn_plugins_wireguard_la_LDFLAGS = $(plugin_ldflags)
98 vpn_plugins_wireguard_la_LIBADD = @LIBMNL_LIBS@
103 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
104 if OPENCONNECT_BUILTIN
105 builtin_vpn_modules += openconnect
106 builtin_vpn_sources += vpn/plugins/openconnect.c
107 builtin_vpn_cflags += -DOPENCONNECT=\"@OPENCONNECT@\" \
108 @LIBOPENCONNECT_CFLAGS@
109 builtin_vpn_libadd += @LIBOPENCONNECT_LIBS@
111 vpn_plugin_LTLIBRARIES += vpn/plugins/openconnect.la
112 vpn_plugin_objects += $(plugins_openconnect_la_OBJECTS)
113 vpn_plugins_openconnect_la_SOURCES = vpn/plugins/openconnect.c
114 vpn_plugins_openconnect_la_CFLAGS = $(plugin_cflags) \
115 -DOPENCONNECT=\"@OPENCONNECT@\" \
116 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
117 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
118 @LIBOPENCONNECT_CFLAGS@
119 vpn_plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
120 vpn_plugins_openconnect_la_LIBADD = @LIBOPENCONNECT_LIBS@
125 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
127 builtin_vpn_modules += openvpn
128 builtin_vpn_sources += vpn/plugins/openvpn.c
129 builtin_vpn_cflags += -DOPENVPN=\"@OPENVPN@\"
131 vpn_plugin_LTLIBRARIES += vpn/plugins/openvpn.la
132 vpn_plugin_objects += $(plugins_openvpn_la_OBJECTS)
133 vpn_plugins_openvpn_la_SOURCES = vpn/plugins/openvpn.c
134 vpn_plugins_openvpn_la_CFLAGS = $(plugin_cflags) -DOPENVPN=\"@OPENVPN@\" \
135 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
136 -DSCRIPTDIR=\""$(build_scriptdir)"\"
137 vpn_plugins_openvpn_la_LDFLAGS = $(plugin_ldflags)
143 builtin_vpn_modules += ipsec
144 builtin_vpn_sources += vpn/plugins/ipsec.h vpn/plugins/ipsec.c
145 builtin_vpn_sources += vpn/plugins/vici-client.h vpn/plugins/vici-client.c
146 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
147 builtin_vpn_cflags += -DIPSEC=\"@IPSEC@\"
149 vpn_plugin_LTLIBRARIES += vpn/plugins/ipsec.la
150 vpn_plugin_objects += $(plugins_ipsec_la_OBJECTS)
151 vpn_plugins_ipsec_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
152 vpn/plugins/ipsec.c vpn/plugins/vici-client.c
153 vpn_plugins_ipsec_la_CFLAGS = $(plugin_cflags) -DIPSEC=\"@IPSEC@\" \
154 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
155 -DSCRIPTDIR=\""$(build_scriptdir)"\" @GIO_CFLAGS@
156 vpn_plugins_ipsec_la_LDFLAGS = $(plugin_ldflags) @GIO_LIBS@
161 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
163 builtin_vpn_modules += vpnc
164 builtin_vpn_sources += vpn/plugins/vpnc.c
165 builtin_vpn_cflags += -DVPNC=\"@VPNC@\"
167 vpn_plugin_LTLIBRARIES += vpn/plugins/vpnc.la
168 vpn_plugin_objects += $(plugins_vpnc_la_OBJECTS)
169 vpn_plugins_vpnc_la_SOURCES = vpn/plugins/vpnc.c
170 vpn_plugins_vpnc_la_CFLAGS = $(plugin_cflags) -DVPNC=\"@VPNC@\" \
171 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
172 -DSCRIPTDIR=\""$(build_scriptdir)"\"
173 vpn_plugins_vpnc_la_LDFLAGS = $(plugin_ldflags)
178 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
180 builtin_vpn_modules += l2tp
181 builtin_vpn_sources += vpn/plugins/l2tp.c
182 builtin_vpn_cflags += -DL2TP=\"@L2TP@\"
184 vpn_plugin_LTLIBRARIES += vpn/plugins/l2tp.la
185 vpn_plugin_objects += $(plugins_l2tp_la_OBJECTS)
186 vpn_plugins_l2tp_la_SOURCES = vpn/plugins/l2tp.c
187 vpn_plugins_l2tp_la_CFLAGS = $(plugin_cflags) -DL2TP=\"@L2TP@\" \
188 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
189 -DSCRIPTDIR=\""$(build_scriptdir)"\"
190 vpn_plugins_l2tp_la_LDFLAGS = $(plugin_ldflags)
195 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
197 builtin_vpn_modules += pptp
198 builtin_vpn_sources += vpn/plugins/pptp.c
199 builtin_vpn_cflags += -DPPPD=\"@PPPD@\" -DPPTP=\"@PPTP@\"
201 vpn_plugin_LTLIBRARIES += vpn/plugins/pptp.la
202 vpn_plugin_objects += $(plugins_pptp_la_OBJECTS)
203 vpn_plugins_pptp_la_SOURCES = vpn/plugins/pptp.c
204 vpn_plugins_pptp_la_CFLAGS = $(plugin_cflags) -DPPPD=\"@PPPD@\" \
206 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
207 -DSCRIPTDIR=\""$(build_scriptdir)"\"
208 vpn_plugins_pptp_la_LDFLAGS = $(plugin_ldflags)
213 script_LTLIBRARIES += scripts/libppp-plugin.la
214 scripts_libppp_plugin_la_LDFLAGS = $(plugin_ldflags)
215 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
218 script_LTLIBRARIES += scripts/libppp-plugin.la
219 scripts_libppp_plugin_la_LDFLAGS = $(plugin_ldflags)
220 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
225 builtin_vpn_sources += $(builtin_vpn_source)
230 builtin_modules += pacrunner
231 builtin_sources += plugins/pacrunner.c
235 builtin_modules += polkit
236 builtin_sources += plugins/polkit.c
239 policydir = @POLKIT_DATADIR@
241 policy_DATA = plugins/net.connman.policy
244 policy_DATA += vpn/net.connman.vpn.policy
250 plugin_LTLIBRARIES += plugins/iospm.la
251 plugin_objects += $(plugins_iospm_la_OBJECTS)
252 plugins_iospm_la_CFLAGS = $(plugin_cflags)
253 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
257 scripts_openconnect_script_LDADD = @DBUS_LIBS@ @DLOG_LIBS@
260 script_PROGRAMS += scripts/vpn-script
262 scripts_vpn_script_LDADD = @DBUS_LIBS@
267 script_PROGRAMS += scripts/openvpn-script
269 scripts_openvpn_script_LDADD = @DBUS_LIBS@ @DLOG_LIBS@
273 script_PROGRAMS += scripts/ipsec-script
275 scripts_ipsec_script_LDADD = @DBUS_LIBS@ @DLOG_LIBS@
279 builtin_modules += nmcompat
280 builtin_sources += plugins/nmcompat.c
285 builtin_modules += tist
286 builtin_sources += plugins/tist.c
288 plugin_LTLIBRARIES += plugins/tist.la
289 plugin_objects += $(plugins_tist_la_OBJECTS)
290 plugins_tist_la_CFLAGS = $(plugin_cflags)
291 plugins_tist_la_LDFLAGS = $(plugin_ldflags)
295 if SESSION_POLICY_LOCAL
296 if SESSION_POLICY_LOCAL_BUILTIN
297 builtin_modules += session_policy_local
298 builtin_sources += plugins/session_policy_local.c
300 plugin_LTLIBRARIES += plugins/session_policy_local.la
301 plugin_objects += $(plugins_session_policy_local_la_OBJECTS)
302 plugins_session_policy_local_la_CFLAGS = $(plugin_cflags) \
303 -DSTORAGEDIR=\""$(storagedir)\""
304 plugins_session_policy_local_la_LDFLAGS = $(plugin_ldflags)
309 builtin_modules += neard
310 builtin_sources += plugins/neard.c
313 EXTRA_DIST += plugins/polkit.policy
315 plugins/net.connman.policy: plugins/polkit.policy
320 EXTRA_DIST += vpn/vpn-polkit.policy
323 vpn/net.connman.vpn.policy: vpn/vpn-polkit.policy