5d9733204df9cae2c86fe52c6f70c01efbafbf84
[platform/upstream/connman.git] / Makefile.plugins
1
2 noinst_LTLIBRARIES = plugins/libgatchat.la
3
4 plugins_libgatchat_la_SOURCES = gatchat/gatchat.h gatchat/gatchat.c \
5                                 gatchat/gatresult.h gatchat/gatresult.c \
6                                 gatchat/gatsyntax.h gatchat/gatsyntax.c \
7                                 gatchat/ringbuffer.h gatchat/ringbuffer.c \
8                                 gatchat/gattty.h gatchat/gattty.c
9
10
11 plugin_cflags = -fvisibility=hidden -I$(srcdir)/gdbus \
12                                         @DBUS_CFLAGS@ @GLIB_CFLAGS@
13 plugin_ldflags = -no-undefined -module -avoid-version
14
15
16 if LOOPBACK
17 if LOOPBACK_BUILTIN
18 builtin_modules += loopback
19 builtin_sources += plugins/loopback.c
20 else
21 plugin_LTLIBRARIES += plugins/loopback.la
22 plugin_objects += $(plugins_loopback_la_OBJECTS)
23 plugins_loopback_la_CFLAGS = $(plugin_cflags)
24 plugins_loopback_la_LDFLAGS = $(plugin_ldflags)
25 endif
26 endif
27
28 if ETHERNET
29 if ETHERNET_BUILTIN
30 builtin_modules += ethernet
31 builtin_sources += plugins/ethernet.c
32 else
33 plugin_LTLIBRARIES += plugins/ethernet.la
34 plugin_objects += $(plugins_ethernet_la_OBJECTS)
35 plugins_ethernet_la_CFLAGS = $(plugin_cflags)
36 plugins_ethernet_la_LDFLAGS = $(plugin_ldflags)
37 endif
38 endif
39
40 if WIFI
41 if WIFI_BUILTIN
42 builtin_modules += wifi
43 builtin_sources += plugins/wifi.c plugins/supplicant.h plugins/supplicant.c
44 else
45 plugin_LTLIBRARIES += plugins/wifi.la
46 plugin_objects += $(plugins_wifi_la_OBJECTS)
47 plugins_wifi_la_SOURCES = plugins/wifi.c \
48                                 plugins/supplicant.h plugins/supplicant.c
49 plugins_wifi_la_CFLAGS = $(plugin_cflags)
50 plugins_wifi_la_LDFLAGS = $(plugin_ldflags)
51 endif
52 endif
53
54 if BLUETOOTH
55 if BLUETOOTH_BUILTIN
56 builtin_modules += bluetooth
57 builtin_sources += plugins/bluetooth.c
58 else
59 plugin_LTLIBRARIES += plugins/bluetooth.la
60 plugin_objects += $(plugins_bluetooth_la_OBJECTS)
61 plugins_bluetooth_la_CFLAGS = $(plugin_cflags)
62 plugins_bluetooth_la_LDFLAGS = $(plugin_ldflags)
63 endif
64 endif
65
66 if OFONO
67 if OFONO_BUILTIN
68 builtin_modules += ofono
69 builtin_sources += plugins/ofono.c
70 else
71 plugin_LTLIBRARIES += plugins/ofono.la
72 plugin_objects += $(plugins_ofono_la_OBJECTS)
73 plugins_ofono_la_CFLAGS = $(plugin_cflags)
74 plugins_ofono_la_LDFLAGS = $(plugin_ldflags)
75 endif
76 endif
77
78 if HSO
79 if HSO_BUILTIN
80 builtin_modules += hso
81 builtin_sources += plugins/hso.c
82 builtin_cflags += -I$(srcdir)/gatchat
83 builtin_libadd += plugins/libgatchat.la
84 else
85 plugin_LTLIBRARIES += plugins/hso.la
86 plugin_objects += $(plugins_hso_la_OBJECTS)
87 plugins_hso_la_SOURCES = plugins/hso.c
88 plugins_hso_la_CFLAGS = $(plugin_cflags) -I$(srcdir)/gatchat
89 plugins_hso_la_LIBADD = plugins/libgatchat.la
90 plugins_hso_la_LDFLAGS = $(plugin_ldflags)
91 endif
92 endif
93
94 if MBM
95 if MBM_BUILTIN
96 builtin_modules += mbm
97 builtin_sources += plugins/mbm.c
98 builtin_cflags += -I$(srcdir)/gatchat
99 builtin_libadd += plugins/libgatchat.la
100 else
101 plugin_LTLIBRARIES += plugins/mbm.la
102 plugin_objects += $(plugins_mbm_la_OBJECTS)
103 plugins_mbm_la_SOURCES = plugins/mbm.c
104 plugins_mbm_la_CFLAGS = $(plugin_cflags) -I$(srcdir)/gatchat
105 plugins_mbm_la_LIBADD = plugins/libgatchat.la
106 plugins_mbm_la_LDFLAGS = $(plugin_ldflags)
107 endif
108 endif
109
110 if UDHCP
111 if UDHCP_BUILTIN
112 builtin_modules += udhcp
113 builtin_sources += plugins/udhcp.c plugins/task.h plugins/task.c
114 builtin_cflags += -DUDHCPC=\"@UDHCPC@\"
115 else
116 plugin_LTLIBRARIES += plugins/udhcp.la
117 plugin_objects += $(plugins_udhcp_la_OBJECTS)
118 plugins_udhcp_la_SOURCES = plugins/udhcp.c plugins/task.h plugins/task.c
119 plugins_udhcp_la_CFLAGS = $(plugin_cflags) -DUDHCPC=\"@UDHCPC@\" \
120                                         -DSTATEDIR=\""$(statedir)"\" \
121                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
122 plugins_udhcp_la_LDFLAGS = $(plugin_ldflags)
123 endif
124 endif
125
126 if DHCLIENT
127 if DHCLIENT_BUILTIN
128 builtin_modules += dhclient
129 builtin_sources += plugins/dhclient.c
130 builtin_cflags += -DDHCLIENT=\"@DHCLIENT@\"
131 else
132 plugin_LTLIBRARIES += plugins/dhclient.la
133 plugin_objects += $(plugins_dhclient_la_OBJECTS)
134 plugins_dhclient_la_CFLAGS = $(plugin_cflags) -DDHCLIENT=\"@DHCLIENT@\" \
135                                         -DSTATEDIR=\""$(statedir)"\" \
136                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
137 plugins_dhclient_la_LDFLAGS = $(plugin_ldflags)
138 endif
139 endif
140
141 if RESOLVCONF
142 if RESOLVCONF_BUILTIN
143 builtin_modules += resolvconf
144 builtin_sources += plugins/resolvconf.c
145 builtin_cflags += -DRESOLVCONF=\"@RESOLVCONF@\"
146 else
147 plugin_LTLIBRARIES += plugins/resolvconf.la
148 plugin_objects += $(plugins_resolvconf_la_OBJECTS)
149 plugins_resolvconf_la_CFLAGS = $(plugin_cflags) -DRESOLVCONF=\"@RESOLVCONF@\"
150 plugins_resolvconf_la_LDFLAGS = $(plugin_ldflags)
151 endif
152 endif
153
154 if OPENCONNECT
155 if OPENCONNECT_BUILTIN
156 builtin_modules += openconnect
157 builtin_sources += plugins/openconnect.c
158 builtin_cflags += -DOPENCONNECT=\"@OPENCONNECT@\"
159 else
160 plugin_LTLIBRARIES += plugins/openconnect.la
161 plugin_objects += $(plugins_openconnect_la_OBJECTS)
162 plugins_openconnect_la_CFLAGS = $(plugin_cflags) -DOPENCONNECT=\"@OPENCONNECT@\" \
163                                         -DSTATEDIR=\""$(statedir)"\" \
164                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
165 plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
166 endif
167 endif
168
169 if DNSPROXY
170 if DNSPROXY_BUILTIN
171 builtin_modules += dnsproxy
172 builtin_sources += plugins/dnsproxy.c
173 else
174 plugin_LTLIBRARIES += plugins/dnsproxy.la
175 plugin_objects += $(plugins_dnsproxy_la_OBJECTS)
176 plugins_dnsproxy_la_CFLAGS = $(plugin_cflags)
177 plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags)
178 endif
179 endif
180
181 if GOOGLE
182 if GOOGLE_BUILTIN
183 builtin_modules += google
184 builtin_sources += plugins/google.c
185 else
186 plugin_LTLIBRARIES += plugins/google.la
187 plugin_objects += $(plugins_google_la_OBJECTS)
188 plugins_google_la_CFLAGS = $(plugin_cflags)
189 plugins_google_la_LDFLAGS = $(plugin_ldflags)
190 endif
191 endif
192
193 if MOBLIN
194 if MOBLIN_BUILTIN
195 builtin_modules += moblin
196 builtin_sources += plugins/moblin.c
197 else
198 plugin_LTLIBRARIES += plugins/moblin.la
199 plugin_objects += $(plugins_moblin_la_OBJECTS)
200 plugins_moblin_la_CFLAGS = $(plugin_cflags)
201 plugins_moblin_la_LDFLAGS = $(plugin_ldflags)
202 endif
203 endif
204
205 if POLKIT
206 if POLKIT_BUILTIN
207 builtin_modules += polkit
208 builtin_sources += plugins/polkit.c
209 builtin_libadd += @POLKIT_LIBS@
210 builtin_cflags += @POLKIT_CFLAGS@
211 else
212 plugin_LTLIBRARIES += plugins/polkit.la
213 plugin_objects += $(plugins_polkit_la_OBJECTS)
214 plugins_polkit_la_CFLAGS = $(plugin_cflags) @POLKIT_CFLAGS@
215 plugins_polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
216 plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
217 endif
218
219 if DATAFILES
220 policydir = @POLKIT_DATADIR@
221
222 policy_DATA = plugins/connman.policy
223 endif
224 endif
225
226 if IWMX
227 plugin_LTLIBRARIES += plugins/iwmxsdk.la
228 plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
229 plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
230 plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
231 plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
232 plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
233 endif
234
235 if IOSPM
236 plugin_LTLIBRARIES += plugins/iospm.la
237 plugin_objects += $(plugins_iospm_la_OBJECTS)
238 plugins_iospm_la_CFLAGS = $(plugin_cflags)
239 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
240 endif
241
242 if FAKE
243 plugin_LTLIBRARIES += plugins/fake.la
244 plugin_objects += $(plugins_fake_la_OBJECTS)
245 plugins_fake_la_CFLAGS = $(plugin_cflags)
246 plugins_fake_la_LDFLAGS = $(plugin_ldflags)
247 endif
248
249
250 if UDHCP
251 script_PROGRAMS += scripts/udhcpc-script
252
253 scripts_udhcpc_script_LDADD = @DBUS_LIBS@
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 DHCLIENT
263 script_DATA += scripts/dhclient.conf
264 script_PROGRAMS += scripts/dhclient-script
265
266 scripts_dhclient_script_LDADD = @DBUS_LIBS@
267 endif
268
269
270 EXTRA_DIST += plugins/polkit.policy scripts/dhclient.conf
271
272 plugins/connman.policy: plugins/polkit.policy
273 if POLKIT
274         $(AM_V_GEN)cp $< $@
275 endif