7df46a4843aa6afe695795151f5de83c98c714c1
[framework/connectivity/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 if WIFI
32 if WIFI_BUILTIN
33 builtin_modules += wifi
34 builtin_sources += plugins/wifi.c plugins/supplicant.h plugins/supplicant.c
35 else
36 plugin_LTLIBRARIES += plugins/wifi.la
37 plugin_objects += $(plugins_wifi_la_OBJECTS)
38 plugins_wifi_la_SOURCES = plugins/wifi.c \
39                                 plugins/supplicant.h plugins/supplicant.c
40 plugins_wifi_la_CFLAGS = $(plugin_cflags)
41 plugins_wifi_la_LDFLAGS = $(plugin_ldflags)
42 endif
43 endif
44
45 if BLUETOOTH
46 if BLUETOOTH_BUILTIN
47 builtin_modules += bluetooth
48 builtin_sources += plugins/bluetooth.c
49 else
50 plugin_LTLIBRARIES += plugins/bluetooth.la
51 plugin_objects += $(plugins_bluetooth_la_OBJECTS)
52 plugins_bluetooth_la_CFLAGS = $(plugin_cflags)
53 plugins_bluetooth_la_LDFLAGS = $(plugin_ldflags)
54 endif
55 endif
56
57 if HH2SERIAL_GPS
58 if HH2SERIAL_GPS_BUILTIN
59 builtin_modules += hh2serial_gps
60 builtin_sources += plugins/hh2serial-gps.c
61 else
62 plugin_LTLIBRARIES += plugins/hh2serial-gps.la
63 plugin_objects += $(plugins_hh2serial_gps_la_OBJECTS)
64 plugins_hh2serial_gps_la_CFLAGS = $(plugin_cflags)
65 plugins_hh2serial_gps_la_LDFLAGS = $(plugin_ldflags)
66 endif
67 endif
68
69 if OFONO
70 if OFONO_BUILTIN
71 builtin_modules += ofono
72 builtin_sources += plugins/ofono.c
73 else
74 plugin_LTLIBRARIES += plugins/ofono.la
75 plugin_objects += $(plugins_ofono_la_OBJECTS)
76 plugins_ofono_la_CFLAGS = $(plugin_cflags)
77 plugins_ofono_la_LDFLAGS = $(plugin_ldflags)
78 endif
79 endif
80
81 if UDHCP
82 if UDHCP_BUILTIN
83 builtin_modules += udhcp
84 builtin_sources += plugins/udhcp.c plugins/task.h plugins/task.c
85 builtin_cflags += -DUDHCPC=\"@UDHCPC@\"
86 else
87 plugin_LTLIBRARIES += plugins/udhcp.la
88 plugin_objects += $(plugins_udhcp_la_OBJECTS)
89 plugins_udhcp_la_SOURCES = plugins/udhcp.c plugins/task.h plugins/task.c
90 plugins_udhcp_la_CFLAGS = $(plugin_cflags) -DUDHCPC=\"@UDHCPC@\" \
91                                         -DSTATEDIR=\""$(statedir)"\" \
92                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
93 plugins_udhcp_la_LDFLAGS = $(plugin_ldflags)
94 endif
95 endif
96
97 if DHCLIENT
98 if DHCLIENT_BUILTIN
99 builtin_modules += dhclient
100 builtin_sources += plugins/dhclient.c
101 builtin_cflags += -DDHCLIENT=\"@DHCLIENT@\"
102 else
103 plugin_LTLIBRARIES += plugins/dhclient.la
104 plugin_objects += $(plugins_dhclient_la_OBJECTS)
105 plugins_dhclient_la_CFLAGS = $(plugin_cflags) -DDHCLIENT=\"@DHCLIENT@\" \
106                                         -DSTATEDIR=\""$(statedir)"\" \
107                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
108 plugins_dhclient_la_LDFLAGS = $(plugin_ldflags)
109 endif
110 endif
111
112 if RESOLVCONF
113 if RESOLVCONF_BUILTIN
114 builtin_modules += resolvconf
115 builtin_sources += plugins/resolvconf.c
116 builtin_cflags += -DRESOLVCONF=\"@RESOLVCONF@\"
117 else
118 plugin_LTLIBRARIES += plugins/resolvconf.la
119 plugin_objects += $(plugins_resolvconf_la_OBJECTS)
120 plugins_resolvconf_la_CFLAGS = $(plugin_cflags) -DRESOLVCONF=\"@RESOLVCONF@\"
121 plugins_resolvconf_la_LDFLAGS = $(plugin_ldflags)
122 endif
123 endif
124
125 if OPENCONNECT
126 if OPENCONNECT_BUILTIN
127 builtin_modules += openconnect
128 builtin_sources += plugins/openconnect.c
129 builtin_cflags += -DOPENCONNECT=\"@OPENCONNECT@\"
130 else
131 plugin_LTLIBRARIES += plugins/openconnect.la
132 plugin_objects += $(plugins_openconnect_la_OBJECTS)
133 plugins_openconnect_la_CFLAGS = $(plugin_cflags) -DOPENCONNECT=\"@OPENCONNECT@\" \
134                                         -DSTATEDIR=\""$(statedir)"\" \
135                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
136 plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
137 endif
138 endif
139
140 if PORTAL
141 if PORTAL_BUILTIN
142 builtin_modules += portal
143 builtin_sources += plugins/portal.c
144 else
145 plugin_LTLIBRARIES += plugins/portal.la
146 plugin_objects += $(plugins_portal_la_OBJECTS)
147 plugins_portal_la_CFLAGS = $(plugin_cflags)
148 plugins_portal_la_LDFLAGS = $(plugin_ldflags)
149 endif
150 endif
151
152 if DNSPROXY
153 if DNSPROXY_BUILTIN
154 builtin_modules += dnsproxy
155 builtin_sources += plugins/dnsproxy.c
156 else
157 plugin_LTLIBRARIES += plugins/dnsproxy.la
158 plugin_objects += $(plugins_dnsproxy_la_OBJECTS)
159 plugins_dnsproxy_la_CFLAGS = $(plugin_cflags)
160 plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags)
161 endif
162 endif
163
164 if GOOGLE
165 if GOOGLE_BUILTIN
166 builtin_modules += google
167 builtin_sources += plugins/google.c
168 else
169 plugin_LTLIBRARIES += plugins/google.la
170 plugin_objects += $(plugins_google_la_OBJECTS)
171 plugins_google_la_CFLAGS = $(plugin_cflags)
172 plugins_google_la_LDFLAGS = $(plugin_ldflags)
173 endif
174 endif
175
176 if MEEGO
177 if MEEGO_BUILTIN
178 builtin_modules += meego
179 builtin_sources += plugins/meego.c
180 else
181 plugin_LTLIBRARIES += plugins/meego.la
182 plugin_objects += $(plugins_meego_la_OBJECTS)
183 plugins_meego_la_CFLAGS = $(plugin_cflags)
184 plugins_meego_la_LDFLAGS = $(plugin_ldflags)
185 endif
186 endif
187
188 if POLKIT
189 if POLKIT_BUILTIN
190 builtin_modules += polkit
191 builtin_sources += plugins/polkit.c
192 builtin_libadd += @POLKIT_LIBS@
193 builtin_cflags += @POLKIT_CFLAGS@
194 else
195 plugin_LTLIBRARIES += plugins/polkit.la
196 plugin_objects += $(plugins_polkit_la_OBJECTS)
197 plugins_polkit_la_CFLAGS = $(plugin_cflags) @POLKIT_CFLAGS@
198 plugins_polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
199 plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
200 endif
201
202 if DATAFILES
203 policydir = @POLKIT_DATADIR@
204
205 policy_DATA = plugins/connman.policy
206 endif
207 endif
208
209 if IWMX
210 plugin_LTLIBRARIES += plugins/iwmxsdk.la
211 plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
212 plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
213 plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
214 plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
215 plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
216 endif
217
218 if IOSPM
219 plugin_LTLIBRARIES += plugins/iospm.la
220 plugin_objects += $(plugins_iospm_la_OBJECTS)
221 plugins_iospm_la_CFLAGS = $(plugin_cflags)
222 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
223 endif
224
225 if FAKE
226 plugin_LTLIBRARIES += plugins/fake.la
227 plugin_objects += $(plugins_fake_la_OBJECTS)
228 plugins_fake_la_CFLAGS = $(plugin_cflags)
229 plugins_fake_la_LDFLAGS = $(plugin_ldflags)
230 endif
231
232
233 if UDHCP
234 script_PROGRAMS += scripts/udhcpc-script
235
236 scripts_udhcpc_script_LDADD = @DBUS_LIBS@
237 endif
238
239 if OPENCONNECT
240 script_PROGRAMS += scripts/openconnect-script
241
242 scripts_openconnect_script_LDADD = @DBUS_LIBS@
243 endif
244
245 if DHCLIENT
246 script_DATA += scripts/dhclient.conf
247 script_PROGRAMS += scripts/dhclient-script
248
249 scripts_dhclient_script_LDADD = @DBUS_LIBS@
250 endif
251
252 if NTPD
253 if NTPD_BUILTIN
254 builtin_modules += ntpd
255 builtin_sources += plugins/ntpd.c
256 builtin_cflags += -DNTPD=\"@NTPD@\"
257 else
258 plugin_LTLIBRARIES += plugins/ntpd.la
259 plugin_objects += $(plugins_ntpd_la_OBJECTS)
260 plugins_ntpd_la_CFLAGS = $(plugin_cflags) -DNTPD=\"@NTPD@\"
261 plugins_ntpd_la_LDFLAGS = $(plugin_ldflags)
262 endif
263 endif
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