summaryrefslogtreecommitdiff
path: root/plugins/Makefile.am
blob: 151adabd5a15a9cd1f16c86ce8c998d63d876697 (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

plugindir = $(libdir)/connman/plugins

plugin_LTLIBRARIES =

builtin_modules =
builtin_sources =

if LOOPBACK
builtin_modules += loopback
builtin_sources += loopback.c
endif

if ETHERNET
builtin_modules += ethernet
builtin_sources += ethernet.c inet.h inet.c
endif

if WIFI
plugin_LTLIBRARIES += wifi.la

wifi_la_SOURCES = wifi.c inet.h inet.c supplicant.h supplicant.c
wifi_la_LIBADD = @GDBUS_LIBS@
endif

if BLUETOOTH
plugin_LTLIBRARIES += bluetooth.la

bluetooth_la_SOURCES = bluetooth.c inet.h inet.c
bluetooth_la_LIBADD = @GDBUS_LIBS@
endif

if MODEMMGR
plugin_LTLIBRARIES += modemmgr.la

modemmgr_la_LIBADD = @GDBUS_LIBS@
endif

if NOVATEL
plugin_LTLIBRARIES += novatel.la

novatel_la_SOURCES = novatel.c modem.h modem.c
endif

if HUAWEI
plugin_LTLIBRARIES += huawei.la

huawei_la_SOURCES = huawei.c modem.h modem.c
endif

if HSO
plugin_LTLIBRARIES += hso.la

hso_la_SOURCES = hso.c modem.h modem.c
endif

if UDHCP
plugin_LTLIBRARIES += udhcp.la

udhcp_la_SOURCES = udhcp.c inet.h inet.c task.h task.c
udhcp_la_CFLAGS = $(AM_CFLAGS) -DUDHCPC=\"@UDHCPC@\" \
		-DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\"
endif

if DHCLIENT
plugin_LTLIBRARIES += dhclient.la

dhclient_la_SOURCES = dhclient.c inet.h inet.c
dhclient_la_CFLAGS = $(AM_CFLAGS) -DDHCLIENT=\"@DHCLIENT@\" \
		-DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\"
endif

if PPPD
plugin_LTLIBRARIES += pppd.la

pppd_la_CFLAGS = $(AM_CFLAGS) -DPPPD=\"@PPPD@\"
endif

if RESOLVCONF
plugin_LTLIBRARIES += resolvconf.la

resolvconf_la_CFLAGS = $(AM_CFLAGS) -DRESOLVCONF=\"@RESOLVCONF@\"
endif

if DNSPROXY
builtin_modules += dnsproxy
builtin_sources += dnsproxy.c
endif

if POLKIT
plugin_LTLIBRARIES += polkit.la

polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
polkit_la_CFLAGS = $(AM_CFLAGS) @POLKIT_CFLAGS@

if DATAFILES
policydir = @POLKIT_DATADIR@

policy_DATA = connman.policy
endif
endif

if IOSPM
plugin_LTLIBRARIES += iospm.la
endif

if IWMXSDK
plugin_LTLIBRARIES += iwmxsdk.la

iwmxsdk_la_SOURCES = iwmxsdk.c inet.h inet.c
iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
iwmxsdk_la_CFLAGS = $(AM_CFLAGS) @IWMXSDK_CFLAGS@
endif

if FAKE
plugin_LTLIBRARIES += fake.la
endif

noinst_LTLIBRARIES = libbuiltin.la

libbuiltin_la_SOURCES = $(builtin_sources)
libbuiltin_la_LDFLAGS =
libbuiltin_la_CFLAGS = $(AM_CFLAGS) -DCONNMAN_PLUGIN_BUILTIN

BUILT_SOURCES = builtin.h

nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES)

AM_LDFLAGS = -no-undefined -module -avoid-version

statedir = $(localstatedir)/run/connman

if MAINTAINER_MODE
scriptdir = $(abs_top_srcdir)/scripts
else
scriptdir = $(libdir)/connman/scripts
endif

AM_CFLAGS = -fvisibility=hidden @GLIB_CFLAGS@ @GDBUS_CFLAGS@

INCLUDES = -I$(top_builddir)/include

CLEANFILES = $(BUILT_SOURCES) connman.policy

EXTRA_DIST = polkit.policy

MAINTAINERCLEANFILES = Makefile.in

builtin.h:
	echo "" > $@
	list='$(builtin_modules)'; for i in $$list; \
	  do echo "extern struct connman_plugin_desc __connman_builtin_$$i;" >> $@; done
	echo "static struct connman_plugin_desc *__connman_builtin[] = {" >> $@
	list='$(builtin_modules)'; for i in $$list; \
	  do echo "&__connman_builtin_$$i," >> $@; done
	echo "NULL };" >> $@

connman.policy: polkit.policy
	cp $< $@