93abe89080b5fceaad223a218906d3ebc3765de6
[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 MODEMMGR
79 if MODEMMGR_BUILTIN
80 builtin_modules += modemmgr
81 builtin_sources += plugins/modemmgr.c
82 else
83 plugin_LTLIBRARIES += plugins/modemmgr.la
84 plugin_objects += $(plugins_modemmgr_la_OBJECTS)
85 plugins_modemmgr_la_CFLAGS = $(plugin_cflags)
86 plugins_modemmgr_la_LDFLAGS = $(plugin_ldflags)
87 endif
88 endif
89
90 if HSO
91 if HSO_BUILTIN
92 builtin_modules += hso
93 builtin_sources += plugins/hso.c
94 builtin_cflags += -I$(srcdir)/gatchat
95 builtin_libadd += plugins/libgatchat.la
96 else
97 plugin_LTLIBRARIES += plugins/hso.la
98 plugin_objects += $(plugins_hso_la_OBJECTS)
99 plugins_hso_la_SOURCES = plugins/hso.c
100 plugins_hso_la_CFLAGS = $(plugin_cflags) -I$(srcdir)/gatchat
101 plugins_hso_la_LIBADD = plugins/libgatchat.la
102 plugins_hso_la_LDFLAGS = $(plugin_ldflags)
103 endif
104 endif
105
106 if MBM
107 if MBM_BUILTIN
108 builtin_modules += mbm
109 builtin_sources += plugins/mbm.c
110 builtin_cflags += -I$(srcdir)/gatchat
111 builtin_libadd += plugins/libgatchat.la
112 else
113 plugin_LTLIBRARIES += plugins/mbm.la
114 plugin_objects += $(plugins_mbm_la_OBJECTS)
115 plugins_mbm_la_SOURCES = plugins/mbm.c
116 plugins_mbm_la_CFLAGS = $(plugin_cflags) -I$(srcdir)/gatchat
117 plugins_mbm_la_LIBADD = plugins/libgatchat.la
118 plugins_mbm_la_LDFLAGS = $(plugin_ldflags)
119 endif
120 endif
121
122 if UDHCP
123 if UDHCP_BUILTIN
124 builtin_modules += udhcp
125 builtin_sources += plugins/udhcp.c plugins/task.h plugins/task.c
126 builtin_cflags += -DUDHCPC=\"@UDHCPC@\"
127 else
128 plugin_LTLIBRARIES += plugins/udhcp.la
129 plugin_objects += $(plugins_udhcp_la_OBJECTS)
130 plugins_udhcp_la_SOURCES = plugins/udhcp.c plugins/task.h plugins/task.c
131 plugins_udhcp_la_CFLAGS = $(plugin_cflags) -DUDHCPC=\"@UDHCPC@\" \
132                                         -DSTATEDIR=\""$(statedir)"\" \
133                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
134 plugins_udhcp_la_LDFLAGS = $(plugin_ldflags)
135 endif
136 endif
137
138 if DHCLIENT
139 if DHCLIENT_BUILTIN
140 builtin_modules += dhclient
141 builtin_sources += plugins/dhclient.c
142 builtin_cflags += -DDHCLIENT=\"@DHCLIENT@\"
143 else
144 plugin_LTLIBRARIES += plugins/dhclient.la
145 plugin_objects += $(plugins_dhclient_la_OBJECTS)
146 plugins_dhclient_la_CFLAGS = $(plugin_cflags) -DDHCLIENT=\"@DHCLIENT@\" \
147                                         -DSTATEDIR=\""$(statedir)"\" \
148                                         -DSCRIPTDIR=\""$(build_scriptdir)"\"
149 plugins_dhclient_la_LDFLAGS = $(plugin_ldflags)
150 endif
151 endif
152
153 if RESOLVCONF
154 if RESOLVCONF_BUILTIN
155 builtin_modules += resolvconf
156 builtin_sources += plugins/resolvconf.c
157 builtin_cflags += -DRESOLVCONF=\"@RESOLVCONF@\"
158 else
159 plugin_LTLIBRARIES += plugins/resolvconf.la
160 plugin_objects += $(plugins_resolvconf_la_OBJECTS)
161 plugins_resolvconf_la_CFLAGS = $(plugin_cflags) -DRESOLVCONF=\"@RESOLVCONF@\"
162 plugins_resolvconf_la_LDFLAGS = $(plugin_ldflags)
163 endif
164 endif
165
166 if DNSPROXY
167 if DNSPROXY_BUILTIN
168 builtin_modules += dnsproxy
169 builtin_sources += plugins/dnsproxy.c
170 else
171 plugin_LTLIBRARIES += plugins/dnsproxy.la
172 plugin_objects += $(plugins_dnsproxy_la_OBJECTS)
173 plugins_dnsproxy_la_CFLAGS = $(plugin_cflags)
174 plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags)
175 endif
176 endif
177
178 if POLKIT
179 if POLKIT_BUILTIN
180 builtin_modules += polkit
181 builtin_sources += plugins/polkit.c
182 builtin_libadd += @POLKIT_LIBS@
183 builtin_cflags += @POLKIT_CFLAGS@
184 else
185 plugin_LTLIBRARIES += plugins/polkit.la
186 plugin_objects += $(plugins_polkit_la_OBJECTS)
187 plugins_polkit_la_CFLAGS = $(plugin_cflags) @POLKIT_CFLAGS@
188 plugins_polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
189 plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
190 endif
191
192 if DATAFILES
193 policydir = @POLKIT_DATADIR@
194
195 policy_DATA = plugins/connman.policy
196 endif
197 endif
198
199 if IWMX
200 plugin_LTLIBRARIES += plugins/iwmxsdk.la
201 plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
202 plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
203 plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
204 plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
205 plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
206 endif
207
208 if IOSPM
209 plugin_LTLIBRARIES += plugins/iospm.la
210 plugin_objects += $(plugins_iospm_la_OBJECTS)
211 plugins_iospm_la_CFLAGS = $(plugin_cflags)
212 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
213 endif
214
215 if FAKE
216 plugin_LTLIBRARIES += plugins/fake.la
217 plugin_objects += $(plugins_fake_la_OBJECTS)
218 plugins_fake_la_CFLAGS = $(plugin_cflags)
219 plugins_fake_la_LDFLAGS = $(plugin_ldflags)
220 endif
221
222
223 if UDHCP
224 script_PROGRAMS += scripts/udhcpc-script
225
226 scripts_udhcpc_script_LDADD = @DBUS_LIBS@
227 endif
228
229 if DHCLIENT
230 script_DATA += scripts/dhclient.conf
231 script_PROGRAMS += scripts/dhclient-script
232
233 scripts_dhclient_script_LDADD = @DBUS_LIBS@
234 endif
235
236
237 EXTRA_DIST += plugins/polkit.policy scripts/dhclient.conf
238
239 plugins/connman.policy: plugins/polkit.policy
240 if POLKIT
241         $(AM_V_GEN)cp $< $@
242 endif