ed14ac2e6568bf1b2546f8b935cf4ce05c59f747
[connman] / plugins / Makefile.am
1
2 plugindir = $(libdir)/connman/plugins
3
4 plugin_LTLIBRARIES =
5
6 builtin_modules =
7 builtin_sources =
8 builtin_cflags =
9
10 if LOOPBACK
11 if LOOPBACK_BUILTIN
12 builtin_modules += loopback
13 builtin_sources += loopback.c
14 else
15 plugin_LTLIBRARIES += loopback.la
16 endif
17 endif
18
19 if ETHERNET
20 if ETHERNET_BUILTIN
21 builtin_modules += ethernet
22 builtin_sources += ethernet.c inet.h inet.c
23 else
24 plugin_LTLIBRARIES += ethernet.la
25 ethernet_la_SOURCES = ethernet.c inet.h inet.c
26 endif
27 endif
28
29 if WIFI
30 if WIFI_BUILTIN
31 builtin_modules += wifi
32 builtin_sources += wifi.c inet.h inet.c supplicant.h supplicant.c
33 else
34 plugin_LTLIBRARIES += wifi.la
35 wifi_la_SOURCES = wifi.c inet.h inet.c supplicant.h supplicant.c
36 wifi_la_LIBADD = @GDBUS_LIBS@
37 endif
38 endif
39
40 if BLUETOOTH
41 if BLUETOOTH_BUILTIN
42 builtin_modules += bluetooth
43 builtin_sources += bluetooth.c inet.h inet.c
44 else
45 plugin_LTLIBRARIES += bluetooth.la
46 bluetooth_la_SOURCES = bluetooth.c inet.h inet.c
47 bluetooth_la_LIBADD = @GDBUS_LIBS@
48 endif
49 endif
50
51 if MODEMMGR
52 plugin_LTLIBRARIES += modemmgr.la
53 modemmgr_la_LIBADD = @GDBUS_LIBS@
54 endif
55
56 if NOVATEL
57 plugin_LTLIBRARIES += novatel.la
58 novatel_la_SOURCES = novatel.c modem.h modem.c
59 endif
60
61 if HUAWEI
62 plugin_LTLIBRARIES += huawei.la
63 huawei_la_SOURCES = huawei.c modem.h modem.c
64 endif
65
66 if HSO
67 plugin_LTLIBRARIES += hso.la
68 hso_la_SOURCES = hso.c modem.h modem.c
69 endif
70
71 if UDHCP
72 plugin_LTLIBRARIES += udhcp.la
73 udhcp_la_SOURCES = udhcp.c inet.h inet.c task.h task.c
74 udhcp_la_CFLAGS = $(AM_CFLAGS) -DUDHCPC=\"@UDHCPC@\" \
75                 -DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\"
76 endif
77
78 if DHCLIENT
79 plugin_LTLIBRARIES += dhclient.la
80 dhclient_la_SOURCES = dhclient.c inet.h inet.c
81 dhclient_la_CFLAGS = $(AM_CFLAGS) -DDHCLIENT=\"@DHCLIENT@\" \
82                 -DSTATEDIR=\""$(statedir)"\" -DSCRIPTDIR=\""$(scriptdir)"\"
83 endif
84
85 if PPPD
86 plugin_LTLIBRARIES += pppd.la
87 pppd_la_CFLAGS = $(AM_CFLAGS) -DPPPD=\"@PPPD@\"
88 endif
89
90 if RESOLVCONF
91 if RESOLVCONF_BUILTIN
92 builtin_modules += resolvconf
93 builtin_sources += resolvconf.c
94 builtin_cflags += -DRESOLVCONF=\"@RESOLVCONF@\"
95 else
96 plugin_LTLIBRARIES += resolvconf.la
97 resolvconf_la_CFLAGS = $(AM_CFLAGS) -DRESOLVCONF=\"@RESOLVCONF@\"
98 endif
99 endif
100
101 if DNSPROXY
102 if DNSPROXY_BUILTIN
103 builtin_modules += dnsproxy
104 builtin_sources += dnsproxy.c
105 else
106 plugin_LTLIBRARIES += dnsproxy.la
107 endif
108 endif
109
110 if POLKIT
111 plugin_LTLIBRARIES += polkit.la
112 polkit_la_LIBADD = @POLKIT_LIBS@ @GLIB_LIBS@
113 polkit_la_CFLAGS = $(AM_CFLAGS) @POLKIT_CFLAGS@
114
115 if DATAFILES
116 policydir = @POLKIT_DATADIR@
117
118 policy_DATA = connman.policy
119 endif
120 endif
121
122 if IOSPM
123 plugin_LTLIBRARIES += iospm.la
124 endif
125
126 if IWMXSDK
127 plugin_LTLIBRARIES += iwmxsdk.la
128 iwmxsdk_la_SOURCES = iwmxsdk.c inet.h inet.c
129 iwmxsdk_la_LIBADD = @IWMXSDK_LIBS@ @GLIB_LIBS@
130 iwmxsdk_la_CFLAGS = $(AM_CFLAGS) @IWMXSDK_CFLAGS@
131 endif
132
133 if FAKE
134 plugin_LTLIBRARIES += fake.la
135 endif
136
137 noinst_LTLIBRARIES = libbuiltin.la
138
139 libbuiltin_la_SOURCES = $(builtin_sources)
140 libbuiltin_la_LDFLAGS =
141 libbuiltin_la_CFLAGS = $(AM_CFLAGS) $(builtin_cflags) -DCONNMAN_PLUGIN_BUILTIN
142
143 BUILT_SOURCES = builtin.h
144
145 nodist_libbuiltin_la_SOURCES = $(BUILT_SOURCES)
146
147 AM_LDFLAGS = -no-undefined -module -avoid-version
148
149 statedir = $(localstatedir)/run/connman
150
151 if MAINTAINER_MODE
152 scriptdir = $(abs_top_srcdir)/scripts
153 else
154 scriptdir = $(libdir)/connman/scripts
155 endif
156
157 AM_CFLAGS = -fvisibility=hidden @GLIB_CFLAGS@ @GDBUS_CFLAGS@
158
159 INCLUDES = -I$(top_builddir)/include
160
161 CLEANFILES = $(BUILT_SOURCES) connman.policy
162
163 EXTRA_DIST = polkit.policy
164
165 MAINTAINERCLEANFILES = Makefile.in
166
167 builtin.h:
168         echo "" > $@
169         list='$(builtin_modules)'; for i in $$list; \
170           do echo "extern struct connman_plugin_desc __connman_builtin_$$i;" >> $@; done
171         echo "" >> $@
172         echo "static struct connman_plugin_desc *__connman_builtin[] = {" >> $@
173         list='$(builtin_modules)'; for i in $$list; \
174           do echo "&__connman_builtin_$$i," >> $@; done
175         echo "NULL };" >> $@
176
177 connman.policy: polkit.policy
178         cp $< $@