provider: Return existing service path if already connected
[framework/connectivity/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
7 if LOOPBACK
8 if LOOPBACK_BUILTIN
9 builtin_modules += loopback
10 builtin_sources += plugins/loopback.c
11 else
12 plugin_LTLIBRARIES += plugins/loopback.la
13 plugin_objects += $(plugins_loopback_la_OBJECTS)
14 plugins_loopback_la_CFLAGS = $(plugin_cflags)
15 plugins_loopback_la_LDFLAGS = $(plugin_ldflags)
16 endif
17 endif
18
19 if ETHERNET
20 if ETHERNET_BUILTIN
21 builtin_modules += ethernet
22 builtin_sources += plugins/ethernet.c
23 else
24 plugin_LTLIBRARIES += plugins/ethernet.la
25 plugin_objects += $(plugins_ethernet_la_OBJECTS)
26 plugins_ethernet_la_CFLAGS = $(plugin_cflags)
27 plugins_ethernet_la_LDFLAGS = $(plugin_ldflags)
28 endif
29 endif
30
31 gsupplicant_sources = gsupplicant/gsupplicant.h gsupplicant/dbus.h \
32                         gsupplicant/supplicant.c gsupplicant/dbus.c
33
34 if WIFI
35 if WIFI_BUILTIN
36 builtin_modules += wifi
37 builtin_sources += plugins/wifi.c $(gsupplicant_sources)
38
39 else
40 plugin_LTLIBRARIES += plugins/wifi.la
41 plugin_objects += $(plugins_wifi_la_OBJECTS)
42 plugins_wifi_la_SOURCES = plugins/wifi.c $(gsupplicant_sources)
43 plugins_wifi_la_CFLAGS = $(plugin_cflags)
44 plugins_wifi_la_LDFLAGS = $(plugin_ldflags)
45
46 endif
47 endif
48
49 if BLUETOOTH
50 if BLUETOOTH_BUILTIN
51 builtin_modules += bluetooth
52 builtin_sources += plugins/bluetooth.c
53 else
54 plugin_LTLIBRARIES += plugins/bluetooth.la
55 plugin_objects += $(plugins_bluetooth_la_OBJECTS)
56 plugins_bluetooth_la_CFLAGS = $(plugin_cflags)
57 plugins_bluetooth_la_LDFLAGS = $(plugin_ldflags)
58 endif
59 endif
60
61 if HH2SERIAL_GPS
62 if HH2SERIAL_GPS_BUILTIN
63 builtin_modules += hh2serial_gps
64 builtin_sources += plugins/hh2serial-gps.c
65 else
66 plugin_LTLIBRARIES += plugins/hh2serial-gps.la
67 plugin_objects += $(plugins_hh2serial_gps_la_OBJECTS)
68 plugins_hh2serial_gps_la_CFLAGS = $(plugin_cflags)
69 plugins_hh2serial_gps_la_LDFLAGS = $(plugin_ldflags)
70 endif
71 endif
72
73 if OFONO
74 if OFONO_BUILTIN
75 builtin_modules += ofono
76 builtin_sources += plugins/mcc.h plugins/ofono.c
77 else
78 plugin_LTLIBRARIES += plugins/ofono.la
79 plugin_objects += $(plugins_ofono_la_OBJECTS)
80 plugins_ofono_la_SOURCES = plugins/mcc.h plugins/ofono.c
81 plugins_ofono_la_CFLAGS = $(plugin_cflags)
82 plugins_ofono_la_LDFLAGS = $(plugin_ldflags)
83 endif
84 endif
85
86 if OPENCONNECT
87 if OPENCONNECT_BUILTIN
88 builtin_modules += openconnect
89 builtin_sources += plugins/openconnect.c
90 builtin_vpn_sources = plugins/vpn.c plugins/vpn.h
91 builtin_cflags += -DOPENCONNECT=\"@OPENCONNECT@\"
92 else
93 plugin_LTLIBRARIES += plugins/openconnect.la
94 plugin_objects += $(plugins_openconnect_la_OBJECTS)
95 plugins_openconnect_la_SOURCES = plugins/vpn.h plugins/vpn.c \
96                                                 plugins/openconnect.c
97 plugins_openconnect_la_CFLAGS = $(plugin_cflags) -DOPENCONNECT=\"@OPENCONNECT@\" \
98                                         -DSTATEDIR=\""$(statedir)"\" \
99                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
100 plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
101 endif
102 endif
103
104 if OPENVPN
105 if OPENVPN_BUILTIN
106 builtin_modules += openvpn
107 builtin_sources += plugins/openvpn.c
108 builtin_vpn_sources = plugins/vpn.c plugins/vpn.h
109 builtin_cflags += -DOPENVPN=\"@OPENVPN@\"
110 else
111 plugin_LTLIBRARIES += plugins/openvpn.la
112 plugin_objects += $(plugins_openvpn_la_OBJECTS)
113 plugins_openvpn_la_SOURCES = plugins/vpn.h plugins/vpn.c \
114                                                 plugins/openvpn.c
115 plugins_openvpn_la_CFLAGS = $(plugin_cflags) -DOPENVPN=\"@OPENVPN@\" \
116                                         -DSTATEDIR=\""$(statedir)"\" \
117                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
118 plugins_openvpn_la_LDFLAGS = $(plugin_ldflags)
119 endif
120 endif
121
122 if VPNC
123 if VPNC_BUILTIN
124 builtin_modules += vpnc
125 builtin_sources += plugins/vpnc.c
126 builtin_vpn_sources = plugins/vpn.c plugins/vpn.h
127 builtin_cflags += -DVPNC=\"@VPNC@\"
128 else
129 plugin_LTLIBRARIES += plugins/vpnc.la
130 plugin_objects += $(plugins_vpnc_la_OBJECTS)
131 plugins_vpnc_la_SOURCES = plugins/vpn.h plugins/vpn.c \
132                                                 plugins/vpnc.c
133 plugins_vpnc_la_CFLAGS = $(plugin_cflags) -DVPNC=\"@VPNC@\" \
134                                         -DSTATEDIR=\""$(statedir)"\" \
135                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
136 plugins_vpnc_la_LDFLAGS = $(plugin_ldflags)
137 endif
138 endif
139
140 builtin_sources += $(builtin_vpn_sources)
141
142 if PORTAL
143 if PORTAL_BUILTIN
144 builtin_modules += portal
145 builtin_sources += plugins/portal.c
146 else
147 plugin_LTLIBRARIES += plugins/portal.la
148 plugin_objects += $(plugins_portal_la_OBJECTS)
149 plugins_portal_la_CFLAGS = $(plugin_cflags)
150 plugins_portal_la_LDFLAGS = $(plugin_ldflags)
151 endif
152 endif
153
154 if PACRUNNER
155 if PACRUNNER_BUILTIN
156 builtin_modules += pacrunner
157 builtin_sources += plugins/pacrunner.c
158 else
159 plugin_LTLIBRARIES += plugins/pacrunner.la
160 plugin_objects += $(plugins_pacrunner_la_OBJECTS)
161 plugins_pacrunner_la_CFLAGS = $(plugin_cflags)
162 plugins_pacrunner_la_LDFLAGS = $(plugin_ldflags)
163 endif
164 endif
165
166 if GOOGLE
167 if GOOGLE_BUILTIN
168 builtin_modules += google
169 builtin_sources += plugins/google.c
170 else
171 plugin_LTLIBRARIES += plugins/google.la
172 plugin_objects += $(plugins_google_la_OBJECTS)
173 plugins_google_la_CFLAGS = $(plugin_cflags)
174 plugins_google_la_LDFLAGS = $(plugin_ldflags)
175 endif
176 endif
177
178 if MEEGO
179 if MEEGO_BUILTIN
180 builtin_modules += meego
181 builtin_sources += plugins/meego.c
182 else
183 plugin_LTLIBRARIES += plugins/meego.la
184 plugin_objects += $(plugins_meego_la_OBJECTS)
185 plugins_meego_la_CFLAGS = $(plugin_cflags)
186 plugins_meego_la_LDFLAGS = $(plugin_ldflags)
187 endif
188 endif
189
190 if POLKIT
191 if POLKIT_BUILTIN
192 builtin_modules += polkit
193 builtin_sources += plugins/polkit.c
194 else
195 plugin_LTLIBRARIES += plugins/polkit.la
196 plugin_objects += $(plugins_polkit_la_OBJECTS)
197 plugins_polkit_la_CFLAGS = $(plugin_cflags)
198 plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
199 endif
200
201 if DATAFILES
202 policydir = @POLKIT_DATADIR@
203
204 policy_DATA = plugins/net.connman.policy
205 endif
206 endif
207
208 if IWMX
209 plugin_LTLIBRARIES += plugins/iwmxsdk.la
210 plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
211 plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
212 plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
213 plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
214 plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
215 endif
216
217 if IOSPM
218 plugin_LTLIBRARIES += plugins/iospm.la
219 plugin_objects += $(plugins_iospm_la_OBJECTS)
220 plugins_iospm_la_CFLAGS = $(plugin_cflags)
221 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
222 endif
223
224 if FAKE
225 plugin_LTLIBRARIES += plugins/fake.la
226 plugin_objects += $(plugins_fake_la_OBJECTS)
227 plugins_fake_la_CFLAGS = $(plugin_cflags)
228 plugins_fake_la_LDFLAGS = $(plugin_ldflags)
229 endif
230
231 if OPENCONNECT
232 script_PROGRAMS += scripts/openconnect-script
233
234 scripts_openconnect_script_LDADD = @DBUS_LIBS@
235 else
236 if VPNC
237 script_PROGRAMS += scripts/openconnect-script
238
239 scripts_openconnect_script_LDADD = @DBUS_LIBS@
240 endif
241 endif
242
243 if OPENVPN
244 script_PROGRAMS += scripts/openvpn-script
245
246 scripts_openvpn_script_LDADD = @DBUS_LIBS@
247 endif
248
249 if NTPD
250 if NTPD_BUILTIN
251 builtin_modules += ntpd
252 builtin_sources += plugins/ntpd.c
253 builtin_cflags += -DNTPD=\"@NTPD@\"
254 else
255 plugin_LTLIBRARIES += plugins/ntpd.la
256 plugin_objects += $(plugins_ntpd_la_OBJECTS)
257 plugins_ntpd_la_CFLAGS = $(plugin_cflags) -DNTPD=\"@NTPD@\"
258 plugins_ntpd_la_LDFLAGS = $(plugin_ldflags)
259 endif
260 endif
261
262 if NMCOMPAT
263 if NMCOMPAT_BUILTIN
264 builtin_modules += nmcompat
265 builtin_sources += plugins/nmcompat.c
266 else
267 plugin_LTLIBRARIES += plugins/nmcompat.la
268 plugin_objects += $(plugins_nmcompat_la_OBJECTS)
269 plugins_nmcompat_la_CFLAGS = $(plugin_cflags)
270 plugins_nmcompat_la_LDFLAGS = $(plugin_ldflags)
271 endif
272 endif
273
274 if TIST
275 if TIST_BUILTIN
276 builtin_modules += tist
277 builtin_sources += plugins/tist.c
278 else
279 plugin_LTLIBRARIES += plugins/tist.la
280 plugin_objects += $(plugins_tist_la_OBJECTS)
281 plugins_tist_la_CFLAGS = $(plugin_cflags)
282 plugins_tist_la_LDFLAGS = $(plugin_ldflags)
283 endif
284 endif
285
286 EXTRA_DIST += plugins/polkit.policy
287
288 plugins/net.connman.policy: plugins/polkit.policy
289 if POLKIT
290         $(AM_V_GEN)cp $< $@
291 endif