session-test: Add tests for session_policy_local
[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 script_cflags = -fvisibility=hidden -I$(srcdir)/gdbus \
7                                         @DBUS_CFLAGS@
8
9 if LOOPBACK
10 builtin_modules += loopback
11 builtin_sources += plugins/loopback.c
12 endif
13
14 if ETHERNET
15 builtin_modules += ethernet
16 builtin_sources += plugins/ethernet.c
17 endif
18
19 gsupplicant_sources = gsupplicant/gsupplicant.h gsupplicant/dbus.h \
20                         gsupplicant/supplicant.c gsupplicant/dbus.c
21
22 if WIFI
23 builtin_modules += wifi
24 builtin_sources += plugins/wifi.c $(gsupplicant_sources)
25 endif
26
27 if BLUETOOTH
28 builtin_modules += bluetooth_legacy
29 builtin_sources += plugins/bluetooth_legacy.c
30 builtin_modules += bluetooth
31 builtin_sources += plugins/bluetooth.c
32 endif
33
34 if HH2SERIAL_GPS
35 if HH2SERIAL_GPS_BUILTIN
36 builtin_modules += hh2serial_gps
37 builtin_sources += plugins/hh2serial-gps.c
38 else
39 plugin_LTLIBRARIES += plugins/hh2serial-gps.la
40 plugin_objects += $(plugins_hh2serial_gps_la_OBJECTS)
41 plugins_hh2serial_gps_la_CFLAGS = $(plugin_cflags)
42 plugins_hh2serial_gps_la_LDFLAGS = $(plugin_ldflags)
43 endif
44 endif
45
46 if OFONO
47 builtin_modules += ofono
48 builtin_sources += plugins/mcc.h plugins/ofono.c
49 endif
50
51 if DUNDEE
52 builtin_modules += dundee
53 builtin_sources += plugins/dundee.c
54 endif
55
56 if VPN
57 builtin_modules += vpn
58 builtin_sources += plugins/vpn.c
59
60 if OPENCONNECT
61 if OPENCONNECT_BUILTIN
62 builtin_vpn_modules += openconnect
63 builtin_vpn_sources += vpn/plugins/openconnect.c
64 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
65 builtin_vpn_cflags += -DOPENCONNECT=\"@OPENCONNECT@\"
66 else
67 vpn_plugin_LTLIBRARIES += vpn/plugins/openconnect.la
68 vpn_plugin_objects += $(plugins_openconnect_la_OBJECTS)
69 vpn_plugins_openconnect_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
70                                                 vpn/plugins/openconnect.c
71 vpn_plugins_openconnect_la_CFLAGS = $(plugin_cflags) \
72                                         -DOPENCONNECT=\"@OPENCONNECT@\" \
73                                         -DSTATEDIR=\""$(statedir)"\" \
74                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
75 vpn_plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
76 endif
77 endif
78
79 if OPENVPN
80 if OPENVPN_BUILTIN
81 builtin_vpn_modules += openvpn
82 builtin_vpn_sources += vpn/plugins/openvpn.c
83 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
84 builtin_vpn_cflags += -DOPENVPN=\"@OPENVPN@\"
85 else
86 vpn_plugin_LTLIBRARIES += vpn/plugins/openvpn.la
87 vpn_plugin_objects += $(plugins_openvpn_la_OBJECTS)
88 vpn_plugins_openvpn_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
89                                                 vpn/plugins/openvpn.c
90 vpn_plugins_openvpn_la_CFLAGS = $(plugin_cflags) -DOPENVPN=\"@OPENVPN@\" \
91                                         -DSTATEDIR=\""$(statedir)"\" \
92                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
93 vpn_plugins_openvpn_la_LDFLAGS = $(plugin_ldflags)
94 endif
95 endif
96
97 if VPNC
98 if VPNC_BUILTIN
99 builtin_vpn_modules += vpnc
100 builtin_vpn_sources += vpn/plugins/vpnc.c
101 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
102 builtin_vpn_cflags += -DVPNC=\"@VPNC@\"
103 else
104 vpn_plugin_LTLIBRARIES += vpn/plugins/vpnc.la
105 vpn_plugin_objects += $(plugins_vpnc_la_OBJECTS)
106 vpn_plugins_vpnc_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
107                                                 vpn/plugins/vpnc.c
108 vpn_plugins_vpnc_la_CFLAGS = $(plugin_cflags) -DVPNC=\"@VPNC@\" \
109                                         -DSTATEDIR=\""$(statedir)"\" \
110                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
111 vpn_plugins_vpnc_la_LDFLAGS = $(plugin_ldflags)
112 endif
113 endif
114
115 if L2TP
116 if L2TP_BUILTIN
117 builtin_vpn_modules += l2tp
118 builtin_vpn_sources += vpn/plugins/l2tp.c
119 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
120 builtin_vpn_cflags += -DL2TP=\"@L2TP@\"
121 else
122 vpn_plugin_LTLIBRARIES += vpn/plugins/l2tp.la
123 vpn_plugin_objects += $(plugins_l2tp_la_OBJECTS)
124 vpn_plugins_l2tp_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
125                                                 vpn/plugins/l2tp.c
126 vpn_plugins_l2tp_la_CFLAGS = $(plugin_cflags) -DL2TP=\"@L2TP@\" \
127                                         -DSTATEDIR=\""$(statedir)"\" \
128                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
129 vpn_plugins_l2tp_la_LDFLAGS = $(plugin_ldflags)
130 endif
131 endif
132
133 if PPTP
134 if PPTP_BUILTIN
135 builtin_vpn_modules += pptp
136 builtin_vpn_sources += vpn/plugins/pptp.c
137 builtin_vpn_source = vpn/plugins/vpn.c vpn/plugins/vpn.h
138 builtin_vpn_cflags += -DPPPD=\"@PPPD@\" -DPPTP=\"@PPTP@\"
139 else
140 vpn_plugin_LTLIBRARIES += vpn/plugins/pptp.la
141 vpn_plugin_objects += $(plugins_pptp_la_OBJECTS)
142 vpn_plugins_pptp_la_SOURCES = vpn/plugins/vpn.h vpn/plugins/vpn.c \
143                                                 vpn/plugins/pptp.c
144 vpn_plugins_pptp_la_CFLAGS = $(plugin_cflags) -DPPPD=\"@PPPD@\" \
145                                         -DPPTP=\"@PPTP@\" \
146                                         -DSTATEDIR=\""$(statedir)"\" \
147                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
148 vpn_plugins_pptp_la_LDFLAGS = $(plugin_ldflags)
149 endif
150 endif
151
152 if PPTP
153 script_LTLIBRARIES += scripts/libppp-plugin.la
154 scripts_libppp_plugin_la_LDFLAGS = $(script_cflags) @DBUS_CFLAGS@
155 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
156 else
157 if L2TP
158 script_LTLIBRARIES += scripts/libppp-plugin.la
159 scripts_libppp_plugin_la_LDFLAGS = $(script_cflags) @DBUS_CFLAGS@
160 scripts_libppp_plugin_la_LIBADD = @DBUS_LIBS@
161 endif
162 endif
163
164 if VPN
165 builtin_vpn_sources += $(builtin_vpn_source)
166 endif
167 endif
168
169 if PACRUNNER
170 builtin_modules += pacrunner
171 builtin_sources += plugins/pacrunner.c
172 endif
173
174 if POLKIT
175 builtin_modules += polkit
176 builtin_sources += plugins/polkit.c
177
178 if DATAFILES
179 policydir = @POLKIT_DATADIR@
180
181 policy_DATA = plugins/net.connman.policy
182
183 if VPN
184 policy_DATA += vpn/net.connman.vpn.policy
185 endif
186 endif
187 endif
188
189 if IOSPM
190 plugin_LTLIBRARIES += plugins/iospm.la
191 plugin_objects += $(plugins_iospm_la_OBJECTS)
192 plugins_iospm_la_CFLAGS = $(plugin_cflags)
193 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
194 endif
195
196 if OPENCONNECT
197 script_PROGRAMS += scripts/openconnect-script
198
199 scripts_openconnect_script_LDADD = @DBUS_LIBS@
200 else
201 if VPNC
202 script_PROGRAMS += scripts/openconnect-script
203
204 scripts_openconnect_script_LDADD = @DBUS_LIBS@
205 endif
206 endif
207
208 if OPENVPN
209 script_PROGRAMS += scripts/openvpn-script
210
211 scripts_openvpn_script_LDADD = @DBUS_LIBS@
212 endif
213
214 if NMCOMPAT
215 builtin_modules += nmcompat
216 builtin_sources += plugins/nmcompat.c
217 endif
218
219 if TIST
220 if TIST_BUILTIN
221 builtin_modules += tist
222 builtin_sources += plugins/tist.c
223 else
224 plugin_LTLIBRARIES += plugins/tist.la
225 plugin_objects += $(plugins_tist_la_OBJECTS)
226 plugins_tist_la_CFLAGS = $(plugin_cflags)
227 plugins_tist_la_LDFLAGS = $(plugin_ldflags)
228 endif
229 endif
230
231 if SESSION_POLICY_LOCAL
232 if SESSION_POLICY_LOCAL_BUILTIN
233 builtin_modules += session_policy_local
234 builtin_sources += plugins/session_policy_local.c
235 else
236 plugin_LTLIBRARIES += plugins/session_policy_local.la
237 plugin_objects += $(plugins_session_policy_local_la_OBJECTS)
238 plugins_session_policy_local_la_CFLAGS = $(plugin_cflags) \
239                                 -DSTORAGEDIR=\""$(storagedir)\""
240 plugins_session_policy_local_la_LDFLAGS = $(plugin_ldflags)
241 endif
242 endif
243
244 if NEARD
245 builtin_modules += neard
246 builtin_sources += plugins/neard.c
247 endif
248
249 EXTRA_DIST += plugins/polkit.policy
250
251 plugins/net.connman.policy: plugins/polkit.policy
252 if POLKIT
253         $(AM_V_GEN)cp $< $@
254 endif
255
256 EXTRA_DIST += vpn/vpn-polkit.policy
257
258 if VPN
259 vpn/net.connman.vpn.policy: vpn/vpn-polkit.policy
260 if POLKIT
261         $(AM_V_GEN)cp $< $@
262 endif
263 endif