[SPIN] support ft-psk and ft-eap security type.
[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 VPNC
112 if VPNC_BUILTIN
113 builtin_vpn_modules += vpnc
114 builtin_vpn_sources += vpn/plugins/vpnc.c
115 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
116 builtin_vpn_cflags += -DVPNC=\"@VPNC@\"
117 else
118 vpn_plugin_LTLIBRARIES += vpn/plugins/vpnc.la
119 vpn_plugin_objects += $(plugins_vpnc_la_OBJECTS)
120 vpn_plugins_vpnc_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
121                                                 vpn/plugins/vpnc.c
122 vpn_plugins_vpnc_la_CFLAGS = $(plugin_cflags) -DVPNC=\"@VPNC@\" \
123                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
124                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
125 vpn_plugins_vpnc_la_LDFLAGS = $(plugin_ldflags)
126 endif
127 endif
128
129 if L2TP
130 if L2TP_BUILTIN
131 builtin_vpn_modules += l2tp
132 builtin_vpn_sources += vpn/plugins/l2tp.c
133 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
134 builtin_vpn_cflags += -DL2TP=\"@L2TP@\"
135 else
136 vpn_plugin_LTLIBRARIES += vpn/plugins/l2tp.la
137 vpn_plugin_objects += $(plugins_l2tp_la_OBJECTS)
138 vpn_plugins_l2tp_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
139                                                 vpn/plugins/l2tp.c
140 vpn_plugins_l2tp_la_CFLAGS = $(plugin_cflags) -DL2TP=\"@L2TP@\" \
141                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
142                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
143 vpn_plugins_l2tp_la_LDFLAGS = $(plugin_ldflags)
144 endif
145 endif
146
147 if PPTP
148 if PPTP_BUILTIN
149 builtin_vpn_modules += pptp
150 builtin_vpn_sources += vpn/plugins/pptp.c
151 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
152 builtin_vpn_cflags += -DPPPD=\"@PPPD@\" -DPPTP=\"@PPTP@\"
153 else
154 vpn_plugin_LTLIBRARIES += vpn/plugins/pptp.la
155 vpn_plugin_objects += $(plugins_pptp_la_OBJECTS)
156 vpn_plugins_pptp_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
157                                                 vpn/plugins/pptp.c
158 vpn_plugins_pptp_la_CFLAGS = $(plugin_cflags) -DPPPD=\"@PPPD@\" \
159                                         -DPPTP=\"@PPTP@\" \
160                                         -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
161                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
162 vpn_plugins_pptp_la_LDFLAGS = $(plugin_ldflags)
163 endif
164 endif
165
166 if PPTP
167 script_LTLIBRARIES += scripts/libppp-plugin.la
168 scripts_libppp_plugin_la_LDFLAGS = $(plugin_ldflags)
169 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
170 else
171 if L2TP
172 script_LTLIBRARIES += scripts/libppp-plugin.la
173 scripts_libppp_plugin_la_LDFLAGS = $(plugin_ldflags)
174 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
175 endif
176 endif
177
178 if VPN
179 builtin_vpn_sources += $(builtin_vpn_source)
180 endif
181 endif
182
183 if PACRUNNER
184 builtin_modules += pacrunner
185 builtin_sources += plugins/pacrunner.c
186 endif
187
188 if POLKIT
189 builtin_modules += polkit
190 builtin_sources += plugins/polkit.c
191
192 if DATAFILES
193 policydir = @POLKIT_DATADIR@
194
195 policy_DATA = plugins/net.connman.policy
196
197 if VPN
198 policy_DATA += vpn/net.connman.vpn.policy
199 endif
200 endif
201 endif
202
203 if IOSPM
204 plugin_LTLIBRARIES += plugins/iospm.la
205 plugin_objects += $(plugins_iospm_la_OBJECTS)
206 plugins_iospm_la_CFLAGS = $(plugin_cflags)
207 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
208 endif
209
210 if OPENCONNECT
211 script_PROGRAMS += scripts/openconnect-script
212
213 scripts_openconnect_script_LDADD = @DBUS_LIBS@
214 else
215 if VPNC
216 script_PROGRAMS += scripts/openconnect-script
217
218 scripts_openconnect_script_LDADD = @DBUS_LIBS@
219 endif
220 endif
221
222 if OPENVPN
223 script_PROGRAMS += scripts/openvpn-script
224
225 scripts_openvpn_script_LDADD = @DBUS_LIBS@
226 endif
227
228 if NMCOMPAT
229 builtin_modules += nmcompat
230 builtin_sources += plugins/nmcompat.c
231 endif
232
233 if TIST
234 if TIST_BUILTIN
235 builtin_modules += tist
236 builtin_sources += plugins/tist.c
237 else
238 plugin_LTLIBRARIES += plugins/tist.la
239 plugin_objects += $(plugins_tist_la_OBJECTS)
240 plugins_tist_la_CFLAGS = $(plugin_cflags)
241 plugins_tist_la_LDFLAGS = $(plugin_ldflags)
242 endif
243 endif
244
245 if SESSION_POLICY_LOCAL
246 if SESSION_POLICY_LOCAL_BUILTIN
247 builtin_modules += session_policy_local
248 builtin_sources += plugins/session_policy_local.c
249 else
250 plugin_LTLIBRARIES += plugins/session_policy_local.la
251 plugin_objects += $(plugins_session_policy_local_la_OBJECTS)
252 plugins_session_policy_local_la_CFLAGS = $(plugin_cflags) \
253                                 -DSTORAGEDIR=\""$(storagedir)\""
254 plugins_session_policy_local_la_LDFLAGS = $(plugin_ldflags)
255 endif
256 endif
257
258 if NEARD
259 builtin_modules += neard
260 builtin_sources += plugins/neard.c
261 endif
262
263 EXTRA_DIST += plugins/polkit.policy
264
265 plugins/net.connman.policy: plugins/polkit.policy
266 if POLKIT
267         $(AM_V_GEN)cp $< $@
268 endif
269
270 EXTRA_DIST += vpn/vpn-polkit.policy
271
272 if VPN
273 vpn/net.connman.vpn.policy: vpn/vpn-polkit.policy
274 if POLKIT
275         $(AM_V_GEN)cp $< $@
276 endif
277 endif