Handling multiple message-header fields with the same name.
[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 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/mcc.h plugins/ofono.c
90 else
91 plugin_LTLIBRARIES += plugins/ofono.la
92 plugin_objects += $(plugins_ofono_la_OBJECTS)
93 plugins_ofono_la_SOURCES = plugins/mcc.h plugins/ofono.c
94 plugins_ofono_la_CFLAGS = $(plugin_cflags)
95 plugins_ofono_la_LDFLAGS = $(plugin_ldflags)
96 endif
97 endif
98
99 if OPENCONNECT
100 if OPENCONNECT_BUILTIN
101 builtin_modules += openconnect
102 builtin_sources += plugins/openconnect.c
103 builtin_cflags += -DOPENCONNECT=\"@OPENCONNECT@\"
104 else
105 plugin_LTLIBRARIES += plugins/openconnect.la
106 plugin_objects += $(plugins_openconnect_la_OBJECTS)
107 plugins_openconnect_la_SOURCES = plugins/vpn.h plugins/vpn.c \
108                                                 plugins/openconnect.c
109 plugins_openconnect_la_CFLAGS = $(plugin_cflags) -DOPENCONNECT=\"@OPENCONNECT@\" \
110                                         -DSTATEDIR=\""$(statedir)"\" \
111                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
112 plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
113 endif
114 endif
115
116 if OPENVPN
117 if OPENVPN_BUILTIN
118 builtin_modules += openvpn
119 builtin_sources += plugins/openvpn.c
120 builtin_cflags += -DOPENVPN=\"@OPENVPN@\"
121 else
122 plugin_LTLIBRARIES += plugins/openvpn.la
123 plugin_objects += $(plugins_openvpn_la_OBJECTS)
124 plugins_openvpn_la_SOURCES = plugins/vpn.h plugins/vpn.c \
125                                                 plugins/openvpn.c
126 plugins_openvpn_la_CFLAGS = $(plugin_cflags) -DOPENVPN=\"@OPENVPN@\" \
127                                         -DSTATEDIR=\""$(statedir)"\" \
128                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
129 plugins_openvpn_la_LDFLAGS = $(plugin_ldflags)
130 endif
131 endif
132
133 if OPENCONNECT_BUILTIN
134 builtin_sources += plugins/vpn.c plugins/vpn.h
135 else
136 if OPENVPN_BUILTIN
137 builtin_sources += plugins/vpn.c plugins/vpn.h
138 endif
139 endif
140
141 if PORTAL
142 if PORTAL_BUILTIN
143 builtin_modules += portal
144 builtin_sources += plugins/portal.c
145 else
146 plugin_LTLIBRARIES += plugins/portal.la
147 plugin_objects += $(plugins_portal_la_OBJECTS)
148 plugins_portal_la_CFLAGS = $(plugin_cflags)
149 plugins_portal_la_LDFLAGS = $(plugin_ldflags)
150 endif
151 endif
152
153 if DNSPROXY
154 if DNSPROXY_BUILTIN
155 builtin_modules += dnsproxy
156 builtin_sources += plugins/dnsproxy.c
157 else
158 plugin_LTLIBRARIES += plugins/dnsproxy.la
159 plugin_objects += $(plugins_dnsproxy_la_OBJECTS)
160 plugins_dnsproxy_la_CFLAGS = $(plugin_cflags)
161 plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags)
162 endif
163 endif
164
165 if PACRUNNER
166 if PACRUNNER_BUILTIN
167 builtin_modules += pacrunner
168 builtin_sources += plugins/pacrunner.c
169 else
170 plugin_LTLIBRARIES += plugins/pacrunner.la
171 plugin_objects += $(plugins_pacrunner_la_OBJECTS)
172 plugins_pacrunner_la_CFLAGS = $(plugin_cflags)
173 plugins_pacrunner_la_LDFLAGS = $(plugin_ldflags)
174 endif
175 endif
176
177 if GOOGLE
178 if GOOGLE_BUILTIN
179 builtin_modules += google
180 builtin_sources += plugins/google.c
181 else
182 plugin_LTLIBRARIES += plugins/google.la
183 plugin_objects += $(plugins_google_la_OBJECTS)
184 plugins_google_la_CFLAGS = $(plugin_cflags)
185 plugins_google_la_LDFLAGS = $(plugin_ldflags)
186 endif
187 endif
188
189 if MEEGO
190 if MEEGO_BUILTIN
191 builtin_modules += meego
192 builtin_sources += plugins/meego.c
193 else
194 plugin_LTLIBRARIES += plugins/meego.la
195 plugin_objects += $(plugins_meego_la_OBJECTS)
196 plugins_meego_la_CFLAGS = $(plugin_cflags)
197 plugins_meego_la_LDFLAGS = $(plugin_ldflags)
198 endif
199 endif
200
201 if POLKIT
202 if POLKIT_BUILTIN
203 builtin_modules += polkit
204 builtin_sources += plugins/polkit.c
205 else
206 plugin_LTLIBRARIES += plugins/polkit.la
207 plugin_objects += $(plugins_polkit_la_OBJECTS)
208 plugins_polkit_la_CFLAGS = $(plugin_cflags)
209 plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
210 endif
211
212 if DATAFILES
213 policydir = @POLKIT_DATADIR@
214
215 policy_DATA = plugins/connman.policy
216 endif
217 endif
218
219 if IWMX
220 plugin_LTLIBRARIES += plugins/iwmxsdk.la
221 plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
222 plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
223 plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
224 plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
225 plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
226 endif
227
228 if IOSPM
229 plugin_LTLIBRARIES += plugins/iospm.la
230 plugin_objects += $(plugins_iospm_la_OBJECTS)
231 plugins_iospm_la_CFLAGS = $(plugin_cflags)
232 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
233 endif
234
235 if FAKE
236 plugin_LTLIBRARIES += plugins/fake.la
237 plugin_objects += $(plugins_fake_la_OBJECTS)
238 plugins_fake_la_CFLAGS = $(plugin_cflags)
239 plugins_fake_la_LDFLAGS = $(plugin_ldflags)
240 endif
241
242 if OPENCONNECT
243 script_PROGRAMS += scripts/openconnect-script
244
245 scripts_openconnect_script_LDADD = @DBUS_LIBS@
246 endif
247
248 if OPENVPN
249 script_PROGRAMS += scripts/openvpn-script
250
251 scripts_openvpn_script_LDADD = @DBUS_LIBS@
252 endif
253
254 if NTPD
255 if NTPD_BUILTIN
256 builtin_modules += ntpd
257 builtin_sources += plugins/ntpd.c
258 builtin_cflags += -DNTPD=\"@NTPD@\"
259 else
260 plugin_LTLIBRARIES += plugins/ntpd.la
261 plugin_objects += $(plugins_ntpd_la_OBJECTS)
262 plugins_ntpd_la_CFLAGS = $(plugin_cflags) -DNTPD=\"@NTPD@\"
263 plugins_ntpd_la_LDFLAGS = $(plugin_ldflags)
264 endif
265 endif
266
267 EXTRA_DIST += plugins/polkit.policy
268
269 plugins/connman.policy: plugins/polkit.policy
270 if POLKIT
271         $(AM_V_GEN)cp $< $@
272 endif