l2tp: Add l2tp makefile and configure file
[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 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 if L2TP
141 if L2TP_BUILTIN
142 builtin_modules += l2tp
143 builtin_sources += plugins/l2tp.c
144 builtin_vpn_sources = plugins/vpn.c plugins/vpn.h
145 builtin_cflags += -DL2TP=\"@L2TP@\"
146 else
147 plugin_LTLIBRARIES += plugins/l2tp.la
148 plugin_objects += $(plugins_l2tp_la_OBJECTS)
149 plugins_l2tp_la_SOURCES = plugins/vpn.h plugins/vpn.c \
150                                                 plugins/l2tp.c
151 plugins_l2tp_la_CFLAGS = $(plugin_cflags) -DL2TP=\"@L2TP@\" \
152                                         -DSTATEDIR=\""$(statedir)"\" \
153                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
154 plugins_l2tp_la_LDFLAGS = $(plugin_ldflags)
155 endif
156 endif
157
158 builtin_sources += $(builtin_vpn_sources)
159
160 if PACRUNNER
161 if PACRUNNER_BUILTIN
162 builtin_modules += pacrunner
163 builtin_sources += plugins/pacrunner.c
164 else
165 plugin_LTLIBRARIES += plugins/pacrunner.la
166 plugin_objects += $(plugins_pacrunner_la_OBJECTS)
167 plugins_pacrunner_la_CFLAGS = $(plugin_cflags)
168 plugins_pacrunner_la_LDFLAGS = $(plugin_ldflags)
169 endif
170 endif
171
172 if GOOGLE
173 if GOOGLE_BUILTIN
174 builtin_modules += google
175 builtin_sources += plugins/google.c
176 else
177 plugin_LTLIBRARIES += plugins/google.la
178 plugin_objects += $(plugins_google_la_OBJECTS)
179 plugins_google_la_CFLAGS = $(plugin_cflags)
180 plugins_google_la_LDFLAGS = $(plugin_ldflags)
181 endif
182 endif
183
184 if MEEGO
185 if MEEGO_BUILTIN
186 builtin_modules += meego
187 builtin_sources += plugins/meego.c
188 else
189 plugin_LTLIBRARIES += plugins/meego.la
190 plugin_objects += $(plugins_meego_la_OBJECTS)
191 plugins_meego_la_CFLAGS = $(plugin_cflags)
192 plugins_meego_la_LDFLAGS = $(plugin_ldflags)
193 endif
194 endif
195
196 if POLKIT
197 if POLKIT_BUILTIN
198 builtin_modules += polkit
199 builtin_sources += plugins/polkit.c
200 else
201 plugin_LTLIBRARIES += plugins/polkit.la
202 plugin_objects += $(plugins_polkit_la_OBJECTS)
203 plugins_polkit_la_CFLAGS = $(plugin_cflags)
204 plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
205 endif
206
207 if DATAFILES
208 policydir = @POLKIT_DATADIR@
209
210 policy_DATA = plugins/net.connman.policy
211 endif
212 endif
213
214 if IWMX
215 plugin_LTLIBRARIES += plugins/iwmxsdk.la
216 plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
217 plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
218 plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
219 plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
220 plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
221 endif
222
223 if IOSPM
224 plugin_LTLIBRARIES += plugins/iospm.la
225 plugin_objects += $(plugins_iospm_la_OBJECTS)
226 plugins_iospm_la_CFLAGS = $(plugin_cflags)
227 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
228 endif
229
230 if FAKE
231 plugin_LTLIBRARIES += plugins/fake.la
232 plugin_objects += $(plugins_fake_la_OBJECTS)
233 plugins_fake_la_CFLAGS = $(plugin_cflags)
234 plugins_fake_la_LDFLAGS = $(plugin_ldflags)
235 endif
236
237 if OPENCONNECT
238 script_PROGRAMS += scripts/openconnect-script
239
240 scripts_openconnect_script_LDADD = @DBUS_LIBS@
241 else
242 if VPNC
243 script_PROGRAMS += scripts/openconnect-script
244
245 scripts_openconnect_script_LDADD = @DBUS_LIBS@
246 endif
247 endif
248
249 if OPENVPN
250 script_PROGRAMS += scripts/openvpn-script
251
252 scripts_openvpn_script_LDADD = @DBUS_LIBS@
253 endif
254
255 if NTPD
256 if NTPD_BUILTIN
257 builtin_modules += ntpd
258 builtin_sources += plugins/ntpd.c
259 builtin_cflags += -DNTPD=\"@NTPD@\"
260 else
261 plugin_LTLIBRARIES += plugins/ntpd.la
262 plugin_objects += $(plugins_ntpd_la_OBJECTS)
263 plugins_ntpd_la_CFLAGS = $(plugin_cflags) -DNTPD=\"@NTPD@\"
264 plugins_ntpd_la_LDFLAGS = $(plugin_ldflags)
265 endif
266 endif
267
268 if NMCOMPAT
269 if NMCOMPAT_BUILTIN
270 builtin_modules += nmcompat
271 builtin_sources += plugins/nmcompat.c
272 else
273 plugin_LTLIBRARIES += plugins/nmcompat.la
274 plugin_objects += $(plugins_nmcompat_la_OBJECTS)
275 plugins_nmcompat_la_CFLAGS = $(plugin_cflags)
276 plugins_nmcompat_la_LDFLAGS = $(plugin_ldflags)
277 endif
278 endif
279
280 if TIST
281 if TIST_BUILTIN
282 builtin_modules += tist
283 builtin_sources += plugins/tist.c
284 else
285 plugin_LTLIBRARIES += plugins/tist.la
286 plugin_objects += $(plugins_tist_la_OBJECTS)
287 plugins_tist_la_CFLAGS = $(plugin_cflags)
288 plugins_tist_la_LDFLAGS = $(plugin_ldflags)
289 endif
290 endif
291
292 EXTRA_DIST += plugins/polkit.policy
293
294 plugins/net.connman.policy: plugins/polkit.policy
295 if POLKIT
296         $(AM_V_GEN)cp $< $@
297 endif