summaryrefslogtreecommitdiff
path: root/Makefile.plugins
blob: 0899a51c605ec1239e44315de6d33c85cb455bc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261

noinst_LTLIBRARIES = plugins/libgatchat.la

plugins_libgatchat_la_SOURCES = gatchat/gatchat.h gatchat/gatchat.c \
				gatchat/gatresult.h gatchat/gatresult.c \
				gatchat/gatsyntax.h gatchat/gatsyntax.c \
				gatchat/ringbuffer.h gatchat/ringbuffer.c \
				gatchat/gattty.h gatchat/gattty.c \
				gatchat/gatutil.h gatchat/gatutil.c \
				gatchat/gat.h


plugin_cflags = -fvisibility=hidden -I$(srcdir)/gdbus \
					@DBUS_CFLAGS@ @GLIB_CFLAGS@
plugin_ldflags = -no-undefined -module -avoid-version


if LOOPBACK
if LOOPBACK_BUILTIN
builtin_modules += loopback
builtin_sources += plugins/loopback.c
else
plugin_LTLIBRARIES += plugins/loopback.la
plugin_objects += $(plugins_loopback_la_OBJECTS)
plugins_loopback_la_CFLAGS = $(plugin_cflags)
plugins_loopback_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if ETHERNET
if ETHERNET_BUILTIN
builtin_modules += ethernet
builtin_sources += plugins/ethernet.c
else
plugin_LTLIBRARIES += plugins/ethernet.la
plugin_objects += $(plugins_ethernet_la_OBJECTS)
plugins_ethernet_la_CFLAGS = $(plugin_cflags)
plugins_ethernet_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if WIFI
if WIFI_BUILTIN
builtin_modules += wifi
builtin_sources += plugins/wifi.c plugins/supplicant.h plugins/supplicant.c
else
plugin_LTLIBRARIES += plugins/wifi.la
plugin_objects += $(plugins_wifi_la_OBJECTS)
plugins_wifi_la_SOURCES = plugins/wifi.c \
				plugins/supplicant.h plugins/supplicant.c
plugins_wifi_la_CFLAGS = $(plugin_cflags)
plugins_wifi_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if BLUETOOTH
if BLUETOOTH_BUILTIN
builtin_modules += bluetooth
builtin_sources += plugins/bluetooth.c
else
plugin_LTLIBRARIES += plugins/bluetooth.la
plugin_objects += $(plugins_bluetooth_la_OBJECTS)
plugins_bluetooth_la_CFLAGS = $(plugin_cflags)
plugins_bluetooth_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if OFONO
if OFONO_BUILTIN
builtin_modules += ofono
builtin_sources += plugins/ofono.c
else
plugin_LTLIBRARIES += plugins/ofono.la
plugin_objects += $(plugins_ofono_la_OBJECTS)
plugins_ofono_la_CFLAGS = $(plugin_cflags)
plugins_ofono_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if MBM
if MBM_BUILTIN
builtin_modules += mbm
builtin_sources += plugins/mbm.c
builtin_cflags += -I$(srcdir)/gatchat
builtin_libadd += plugins/libgatchat.la
else
plugin_LTLIBRARIES += plugins/mbm.la
plugin_objects += $(plugins_mbm_la_OBJECTS)
plugins_mbm_la_SOURCES = plugins/mbm.c
plugins_mbm_la_CFLAGS = $(plugin_cflags) -I$(srcdir)/gatchat
plugins_mbm_la_LIBADD = plugins/libgatchat.la
plugins_mbm_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if UDHCP
if UDHCP_BUILTIN
builtin_modules += udhcp
builtin_sources += plugins/udhcp.c plugins/task.h plugins/task.c
builtin_cflags += -DUDHCPC=\"@UDHCPC@\"
else
plugin_LTLIBRARIES += plugins/udhcp.la
plugin_objects += $(plugins_udhcp_la_OBJECTS)
plugins_udhcp_la_SOURCES = plugins/udhcp.c plugins/task.h plugins/task.c
plugins_udhcp_la_CFLAGS = $(plugin_cflags) -DUDHCPC=\"@UDHCPC@\" \
					-DSTATEDIR=\""$(statedir)"\" \
					-DSCRIPTDIR=\""$(build_scriptdir)"\"
plugins_udhcp_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if DHCLIENT
if DHCLIENT_BUILTIN
builtin_modules += dhclient
builtin_sources += plugins/dhclient.c
builtin_cflags += -DDHCLIENT=\"@DHCLIENT@\"
else
plugin_LTLIBRARIES += plugins/dhclient.la
plugin_objects += $(plugins_dhclient_la_OBJECTS)
plugins_dhclient_la_CFLAGS = $(plugin_cflags) -DDHCLIENT=\"@DHCLIENT@\" \
					-DSTATEDIR=\""$(statedir)"\" \
					-DSCRIPTDIR=\""$(build_scriptdir)"\"
plugins_dhclient_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if RESOLVCONF
if RESOLVCONF_BUILTIN
builtin_modules += resolvconf
builtin_sources += plugins/resolvconf.c
builtin_cflags += -DRESOLVCONF=\"@RESOLVCONF@\"
else
plugin_LTLIBRARIES += plugins/resolvconf.la
plugin_objects += $(plugins_resolvconf_la_OBJECTS)
plugins_resolvconf_la_CFLAGS = $(plugin_cflags) -DRESOLVCONF=\"@RESOLVCONF@\"
plugins_resolvconf_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if OPENCONNECT
if OPENCONNECT_BUILTIN
builtin_modules += openconnect
builtin_sources += plugins/openconnect.c
builtin_cflags += -DOPENCONNECT=\"@OPENCONNECT@\"
else
plugin_LTLIBRARIES += plugins/openconnect.la
plugin_objects += $(plugins_openconnect_la_OBJECTS)
plugins_openconnect_la_CFLAGS = $(plugin_cflags) -DOPENCONNECT=\"@OPENCONNECT@\" \
					-DSTATEDIR=\""$(statedir)"\" \
					-DSCRIPTDIR=\""$(build_scriptdir)"\"
plugins_openconnect_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if DNSPROXY
if DNSPROXY_BUILTIN
builtin_modules += dnsproxy
builtin_sources += plugins/dnsproxy.c
else
plugin_LTLIBRARIES += plugins/dnsproxy.la
plugin_objects += $(plugins_dnsproxy_la_OBJECTS)
plugins_dnsproxy_la_CFLAGS = $(plugin_cflags)
plugins_dnsproxy_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if GOOGLE
if GOOGLE_BUILTIN
builtin_modules += google
builtin_sources += plugins/google.c
else
plugin_LTLIBRARIES += plugins/google.la
plugin_objects += $(plugins_google_la_OBJECTS)
plugins_google_la_CFLAGS = $(plugin_cflags)
plugins_google_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if MEEGO
if MEEGO_BUILTIN
builtin_modules += meego
builtin_sources += plugins/meego.c
else
plugin_LTLIBRARIES += plugins/meego.la
plugin_objects += $(plugins_meego_la_OBJECTS)
plugins_meego_la_CFLAGS = $(plugin_cflags)
plugins_meego_la_LDFLAGS = $(plugin_ldflags)
endif
endif

if POLKIT
if POLKIT_BUILTIN
builtin_modules += polkit
builtin_sources += plugins/polkit.c
builtin_libadd += @POLKIT_LIBS@
builtin_cflags += @POLKIT_CFLAGS@
else
plugin_LTLIBRARIES += plugins/polkit.la
plugin_objects += $(plugins_polkit_la_OBJECTS)
plugins_polkit_la_CFLAGS = $(plugin_cflags) @POLKIT_CFLAGS@
plugins_polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
plugins_polkit_la_LDFLAGS = $(plugin_ldflags)
endif

if DATAFILES
policydir = @POLKIT_DATADIR@

policy_DATA = plugins/connman.policy
endif
endif

if IWMX
plugin_LTLIBRARIES += plugins/iwmxsdk.la
plugin_objects += $(plugins_iwmxsdk_la_OBJECTS)
plugins_iwmxsdk_la_SOURCES = plugins/iwmx.h plugins/iwmx.c plugins/iwmxsdk.c
plugins_iwmxsdk_la_CFLAGS = $(plugin_cflags) @IWMXSDK_CFLAGS@
plugins_iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
plugins_iwmxsdk_la_LDFLAGS = $(plugin_ldflags)
endif

if IOSPM
plugin_LTLIBRARIES += plugins/iospm.la
plugin_objects += $(plugins_iospm_la_OBJECTS)
plugins_iospm_la_CFLAGS = $(plugin_cflags)
plugins_iospm_la_LDFLAGS = $(plugin_ldflags)
endif

if FAKE
plugin_LTLIBRARIES += plugins/fake.la
plugin_objects += $(plugins_fake_la_OBJECTS)
plugins_fake_la_CFLAGS = $(plugin_cflags)
plugins_fake_la_LDFLAGS = $(plugin_ldflags)
endif


if UDHCP
script_PROGRAMS += scripts/udhcpc-script

scripts_udhcpc_script_LDADD = @DBUS_LIBS@
endif

if OPENCONNECT
script_PROGRAMS += scripts/openconnect-script

scripts_openconnect_script_LDADD = @DBUS_LIBS@
endif

if DHCLIENT
script_DATA += scripts/dhclient.conf
script_PROGRAMS += scripts/dhclient-script

scripts_dhclient_script_LDADD = @DBUS_LIBS@
endif


EXTRA_DIST += plugins/polkit.policy scripts/dhclient.conf

plugins/connman.policy: plugins/polkit.policy
if POLKIT
	$(AM_V_GEN)cp $< $@
endif