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