[connman] Added support to get WiFi vendor element.
[platform/upstream/connman.git] / Makefile.plugins
1
2 plugin_cflags = -fvisibility=hidden -I$(srcdir)/gdbus \
3                                         @DBUS_CFLAGS@ @GLIB_CFLAGS@
4 plugin_ldflags = -no-undefined -module -avoid-version
5
6 if LOOPBACK
7 builtin_modules += loopback
8 builtin_sources += plugins/loopback.c
9 endif
10
11 if ETHERNET
12 builtin_modules += ethernet
13 builtin_sources += plugins/ethernet.c
14 endif
15
16 if GADGET
17 builtin_modules += gadget
18 builtin_sources += plugins/gadget.c
19 endif
20
21 gsupplicant_sources = gsupplicant/gsupplicant.h gsupplicant/dbus.h \
22                         gsupplicant/supplicant.c gsupplicant/dbus.c
23
24 if WIFI
25 builtin_modules += wifi
26 builtin_sources += plugins/wifi.c $(gsupplicant_sources)
27 endif
28
29 if BLUETOOTH
30 builtin_modules += bluetooth_legacy
31 builtin_sources += plugins/bluetooth_legacy.c
32 builtin_modules += bluetooth
33 builtin_sources += plugins/bluetooth.c
34 endif
35
36 if HH2SERIAL_GPS
37 if HH2SERIAL_GPS_BUILTIN
38 builtin_modules += hh2serial_gps
39 builtin_sources += plugins/hh2serial-gps.c
40 else
41 plugin_LTLIBRARIES += plugins/hh2serial-gps.la
42 plugin_objects += $(plugins_hh2serial_gps_la_OBJECTS)
43 plugins_hh2serial_gps_la_CFLAGS = $(plugin_cflags)
44 plugins_hh2serial_gps_la_LDFLAGS = $(plugin_ldflags)
45 endif
46 endif
47
48 if OFONO
49 builtin_modules += ofono
50 builtin_sources += plugins/mcc.h plugins/ofono.c
51 endif
52
53 if DUNDEE
54 builtin_modules += dundee
55 builtin_sources += plugins/dundee.c
56 endif
57
58 if TELEPHONY
59 if TELEPHONY_BUILTIN
60 builtin_modules += telephony
61 builtin_sources += plugins/telephony.c
62 else
63 plugin_LTLIBRARIES += plugins/telephony.la
64 plugin_objects += $(plugins_telephony_la_OBJECTS)
65 plugins_telephony_la_CFLAGS = $(plugin_cflags)
66 plugins_telephony_la_LDFLAGS = $(plugin_ldflags)
67 endif
68 endif
69
70 if VPN
71 builtin_modules += vpn
72 builtin_sources += plugins/vpn.c
73
74 if OPENCONNECT
75 if OPENCONNECT_BUILTIN
76 builtin_vpn_modules += openconnect
77 builtin_vpn_sources += vpn/plugins/openconnect.c
78 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
79 builtin_vpn_cflags += -DOPENCONNECT=\"@OPENCONNECT@\"
80 else
81 vpn_plugin_LTLIBRARIES += vpn/plugins/openconnect.la
82 vpn_plugin_objects += $(plugins_openconnect_la_OBJECTS)
83 vpn_plugins_openconnect_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
84                                                 vpn/plugins/openconnect.c
85 vpn_plugins_openconnect_la_CFLAGS = $(plugin_cflags) \
86                                         -DOPENCONNECT=\"@OPENCONNECT@\" \
87                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
88                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
89 vpn_plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
90 endif
91 endif
92
93 if OPENVPN
94 if OPENVPN_BUILTIN
95 builtin_vpn_modules += openvpn
96 builtin_vpn_sources += vpn/plugins/openvpn.c
97 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
98 builtin_vpn_cflags += -DOPENVPN=\"@OPENVPN@\"
99 else
100 vpn_plugin_LTLIBRARIES += vpn/plugins/openvpn.la
101 vpn_plugin_objects += $(plugins_openvpn_la_OBJECTS)
102 vpn_plugins_openvpn_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
103                                                 vpn/plugins/openvpn.c
104 vpn_plugins_openvpn_la_CFLAGS = $(plugin_cflags) -DOPENVPN=\"@OPENVPN@\" \
105                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
106                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
107 vpn_plugins_openvpn_la_LDFLAGS = $(plugin_ldflags)
108 endif
109 endif
110
111 if IPSEC
112 if IPSEC_BUILTIN
113 builtin_vpn_modules += ipsec
114 builtin_vpn_sources += vpn/plugins/ipsec.h vpn/plugins/ipsec.c
115 builtin_vpn_sources += vpn/plugins/vici-client.h vpn/plugins/vici-client.c
116 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
117 builtin_vpn_cflags += -DIPSEC=\"@IPSEC@\"
118 else
119 vpn_plugin_LTLIBRARIES += vpn/plugins/ipsec.la
120 vpn_plugin_objects += $(plugins_ipsec_la_OBJECTS)
121 vpn_plugins_ipsec_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
122                                                 vpn/plugins/ipsec.c vpn/plugins/vici-client.c
123 vpn_plugins_ipsec_la_CFLAGS = $(plugin_cflags) -DIPSEC=\"@IPSEC@\" \
124                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
125                                         -DSCRIPTDIR=\""$(build_scriptdir)"\" @GIO_CFLAGS@ @OPENSSL_CFLAGS@
126 vpn_plugins_ipsec_la_LDFLAGS = $(plugin_ldflags) @GIO_LIBS@ @OPENSSL_LIBS@
127 endif
128 endif
129
130 if VPNC
131 if VPNC_BUILTIN
132 builtin_vpn_modules += vpnc
133 builtin_vpn_sources += vpn/plugins/vpnc.c
134 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
135 builtin_vpn_cflags += -DVPNC=\"@VPNC@\"
136 else
137 vpn_plugin_LTLIBRARIES += vpn/plugins/vpnc.la
138 vpn_plugin_objects += $(plugins_vpnc_la_OBJECTS)
139 vpn_plugins_vpnc_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
140                                                 vpn/plugins/vpnc.c
141 vpn_plugins_vpnc_la_CFLAGS = $(plugin_cflags) -DVPNC=\"@VPNC@\" \
142                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
143                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
144 vpn_plugins_vpnc_la_LDFLAGS = $(plugin_ldflags)
145 endif
146 endif
147
148 if L2TP
149 if L2TP_BUILTIN
150 builtin_vpn_modules += l2tp
151 builtin_vpn_sources += vpn/plugins/l2tp.c
152 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
153 builtin_vpn_cflags += -DL2TP=\"@L2TP@\"
154 else
155 vpn_plugin_LTLIBRARIES += vpn/plugins/l2tp.la
156 vpn_plugin_objects += $(plugins_l2tp_la_OBJECTS)
157 vpn_plugins_l2tp_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
158                                                 vpn/plugins/l2tp.c
159 vpn_plugins_l2tp_la_CFLAGS = $(plugin_cflags) -DL2TP=\"@L2TP@\" \
160                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
161                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
162 vpn_plugins_l2tp_la_LDFLAGS = $(plugin_ldflags)
163 endif
164 endif
165
166 if PPTP
167 if PPTP_BUILTIN
168 builtin_vpn_modules += pptp
169 builtin_vpn_sources += vpn/plugins/pptp.c
170 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
171 builtin_vpn_cflags += -DPPPD=\"@PPPD@\" -DPPTP=\"@PPTP@\"
172 else
173 vpn_plugin_LTLIBRARIES += vpn/plugins/pptp.la
174 vpn_plugin_objects += $(plugins_pptp_la_OBJECTS)
175 vpn_plugins_pptp_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
176                                                 vpn/plugins/pptp.c
177 vpn_plugins_pptp_la_CFLAGS = $(plugin_cflags) -DPPPD=\"@PPPD@\" \
178                                         -DPPTP=\"@PPTP@\" \
179                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
180                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
181 vpn_plugins_pptp_la_LDFLAGS = $(plugin_ldflags)
182 endif
183 endif
184
185 if PPTP
186 script_LTLIBRARIES += scripts/libppp-plugin.la
187 scripts_libppp_plugin_la_LDFLAGS = $(plugin_ldflags)
188 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
189 else
190 if L2TP
191 script_LTLIBRARIES += scripts/libppp-plugin.la
192 scripts_libppp_plugin_la_LDFLAGS = $(plugin_ldflags)
193 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
194 endif
195 endif
196
197 if VPN
198 builtin_vpn_sources += $(builtin_vpn_source)
199 endif
200 endif
201
202 if PACRUNNER
203 builtin_modules += pacrunner
204 builtin_sources += plugins/pacrunner.c
205 endif
206
207 if POLKIT
208 builtin_modules += polkit
209 builtin_sources += plugins/polkit.c
210
211 if DATAFILES
212 policydir = @POLKIT_DATADIR@
213
214 policy_DATA = plugins/net.connman.policy
215
216 if VPN
217 policy_DATA += vpn/net.connman.vpn.policy
218 endif
219 endif
220 endif
221
222 if IOSPM
223 plugin_LTLIBRARIES += plugins/iospm.la
224 plugin_objects += $(plugins_iospm_la_OBJECTS)
225 plugins_iospm_la_CFLAGS = $(plugin_cflags)
226 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
227 endif
228
229 if OPENCONNECT
230 script_PROGRAMS += scripts/openconnect-script
231
232 scripts_openconnect_script_LDADD = @DBUS_LIBS@
233 else
234 if VPNC
235 script_PROGRAMS += scripts/openconnect-script
236
237 scripts_openconnect_script_LDADD = @DBUS_LIBS@
238 endif
239 endif
240
241 if OPENVPN
242 script_PROGRAMS += scripts/openvpn-script
243
244 scripts_openvpn_script_LDADD = @DBUS_LIBS@
245 endif
246
247 if IPSEC
248 script_PROGRAMS += scripts/ipsec-script
249
250 scripts_ipsec_script_LDADD = @DBUS_LIBS@
251 endif
252
253 if NMCOMPAT
254 builtin_modules += nmcompat
255 builtin_sources += plugins/nmcompat.c
256 endif
257
258 if TIST
259 if TIST_BUILTIN
260 builtin_modules += tist
261 builtin_sources += plugins/tist.c
262 else
263 plugin_LTLIBRARIES += plugins/tist.la
264 plugin_objects += $(plugins_tist_la_OBJECTS)
265 plugins_tist_la_CFLAGS = $(plugin_cflags)
266 plugins_tist_la_LDFLAGS = $(plugin_ldflags)
267 endif
268 endif
269
270 if SESSION_POLICY_LOCAL
271 if SESSION_POLICY_LOCAL_BUILTIN
272 builtin_modules += session_policy_local
273 builtin_sources += plugins/session_policy_local.c
274 else
275 plugin_LTLIBRARIES += plugins/session_policy_local.la
276 plugin_objects += $(plugins_session_policy_local_la_OBJECTS)
277 plugins_session_policy_local_la_CFLAGS = $(plugin_cflags) \
278                                 -DSTORAGEDIR=\""$(storagedir)\""
279 plugins_session_policy_local_la_LDFLAGS = $(plugin_ldflags)
280 endif
281 endif
282
283 if NEARD
284 builtin_modules += neard
285 builtin_sources += plugins/neard.c
286 endif
287
288 EXTRA_DIST += plugins/polkit.policy
289
290 plugins/net.connman.policy: plugins/polkit.policy
291 if POLKIT
292         $(AM_V_GEN)cp $< $@
293 endif
294
295 EXTRA_DIST += vpn/vpn-polkit.policy
296
297 if VPN
298 vpn/net.connman.vpn.policy: vpn/vpn-polkit.policy
299 if POLKIT
300         $(AM_V_GEN)cp $< $@
301 endif
302 endif