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