Add special routing handling for VPN support
[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 DNSPROXY
155 if DNSPROXY_BUILTIN
156 builtin_modules += dnsproxy
157 builtin_sources += plugins/dnsproxy.c
158 else
159 plugin_LTLIBRARIES += plugins/dnsproxy.la
160 plugin_objects += $(plugins_dnsproxy_la_OBJECTS)
161 plugins_dnsproxy_la_CFLAGS = $(plugin_cflags)
162 plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags)
163 endif
164 endif
165
166 if POLKIT
167 if POLKIT_BUILTIN
168 builtin_modules += polkit
169 builtin_sources += plugins/polkit.c
170 builtin_libadd += @POLKIT_LIBS@
171 builtin_cflags += @POLKIT_CFLAGS@
172 else
173 plugin_LTLIBRARIES += plugins/polkit.la
174 plugin_objects += $(plugins_polkit_la_OBJECTS)
175 plugins_polkit_la_CFLAGS = $(plugin_cflags) @POLKIT_CFLAGS@
176 plugins_polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
177 plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
178 endif
179
180 if DATAFILES
181 policydir = @POLKIT_DATADIR@
182
183 policy_DATA = plugins/connman.policy
184 endif
185 endif
186
187 if IWMX
188 plugin_LTLIBRARIES += plugins/iwmxsdk.la
189 plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
190 plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
191 plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
192 plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
193 plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
194 endif
195
196 if IOSPM
197 plugin_LTLIBRARIES += plugins/iospm.la
198 plugin_objects += $(plugins_iospm_la_OBJECTS)
199 plugins_iospm_la_CFLAGS = $(plugin_cflags)
200 plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
201 endif
202
203 if FAKE
204 plugin_LTLIBRARIES += plugins/fake.la
205 plugin_objects += $(plugins_fake_la_OBJECTS)
206 plugins_fake_la_CFLAGS = $(plugin_cflags)
207 plugins_fake_la_LDFLAGS = $(plugin_ldflags)
208 endif
209
210
211 if UDHCP
212 script_PROGRAMS += scripts/udhcpc-script
213
214 scripts_udhcpc_script_LDADD = @DBUS_LIBS@
215 endif
216
217 if DHCLIENT
218 script_DATA += scripts/dhclient.conf
219 script_PROGRAMS += scripts/dhclient-script
220
221 scripts_dhclient_script_LDADD = @DBUS_LIBS@
222 endif
223
224
225 EXTRA_DIST += plugins/polkit.policy scripts/dhclient.conf
226
227 plugins/connman.policy: plugins/polkit.policy
228 if POLKIT
229         $(AM_V_GEN)cp $< $@
230 endif