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