device: Make scanning getter method public.
[framework/connectivity/connman.git] / Makefile.am
1
2 AM_MAKEFLAGS = --no-print-directory
3
4 includedir = @includedir@/connman
5
6 include_HEADERS = include/types.h include/log.h include/plugin.h \
7                         include/notifier.h include/service.h \
8                         include/resolver.h include/ipconfig.h \
9                         include/device.h include/network.h include/inet.h \
10                         include/storage.h
11
12 nodist_include_HEADERS = include/version.h
13
14 noinst_HEADERS = include/rtnl.h include/task.h \
15                         include/dbus.h include/option.h \
16                         include/provider.h \
17                         include/utsname.h include/timeserver.h include/proxy.h \
18                         include/technology.h include/setting.h
19
20 local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS) \
21                         $(noinst_HEADERS), include/connman/$(notdir $(file)))
22
23
24 gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
25                                         gdbus/object.c gdbus/polkit.c
26
27 gdhcp_sources = gdhcp/gdhcp.h gdhcp/common.h gdhcp/common.c gdhcp/client.c \
28                 gdhcp/server.c gdhcp/ipv4ll.h gdhcp/ipv4ll.c
29
30 gweb_sources = gweb/gweb.h gweb/gweb.c gweb/gresolv.h gweb/gresolv.c
31
32 if WISPR
33 gweb_sources += gweb/giognutls.h gweb/giognutls.c
34 else
35 gweb_sources += gweb/giognutls.h gweb/gionotls.c
36 endif
37
38 if DATAFILES
39
40 if NMCOMPAT
41 nmcompat_conf = plugins/connman-nmcompat.conf
42 endif
43
44 dbusconfdir = @DBUS_CONFDIR@
45
46 dbusconf_DATA = src/connman.conf $(nmcompat_conf)
47
48 if SYSTEMD
49 systemdunitdir = @SYSTEMD_UNITDIR@
50
51 systemdunit_DATA = src/connman.service
52 endif
53 endif
54
55 plugin_LTLIBRARIES =
56
57 plugin_objects =
58
59 builtin_modules =
60 builtin_sources =
61 builtin_libadd =
62 builtin_cflags =
63
64 noinst_PROGRAMS =
65
66 unit_objects =
67
68 sbin_PROGRAMS = src/connmand
69
70 src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) $(gweb_sources) \
71                         $(builtin_sources) src/connman.ver \
72                         src/main.c src/connman.h src/log.c \
73                         src/error.c src/plugin.c src/task.c \
74                         src/device.c src/network.c src/connection.c \
75                         src/manager.c src/service.c \
76                         src/clock.c src/timezone.c \
77                         src/agent.c src/notifier.c src/provider.c \
78                         src/resolver.c src/ipconfig.c src/detect.c src/inet.c \
79                         src/dhcp.c src/dhcpv6.c src/rtnl.c src/proxy.c \
80                         src/utsname.c src/timeserver.c src/rfkill.c \
81                         src/storage.c src/dbus.c src/config.c \
82                         src/technology.c src/counter.c src/ntp.c \
83                         src/session.c src/tethering.c src/wpad.c src/wispr.c \
84                         src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c \
85                         src/ippool.c src/bridge.c src/nat.c
86
87 src_connmand_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ \
88                                 @XTABLES_LIBS@ @GNUTLS_LIBS@ -lresolv -ldl
89
90 src_connmand_LDFLAGS = -Wl,--export-dynamic \
91                                 -Wl,--version-script=$(srcdir)/src/connman.ver
92
93 BUILT_SOURCES = $(local_headers) src/builtin.h
94
95 CLEANFILES = src/connman.conf $(BUILT_SOURCES)
96
97 statedir = $(localstatedir)/run/connman
98
99 plugindir = $(libdir)/connman/plugins
100
101 scriptdir = $(libdir)/connman/scripts
102
103 storagedir = $(localstatedir)/lib/connman
104
105 configdir = ${sysconfdir}/connman
106
107 if MAINTAINER_MODE
108 build_plugindir = $(abs_top_srcdir)/plugins/.libs
109 build_scriptdir = $(abs_top_srcdir)/scripts
110 else
111 build_plugindir = $(plugindir)
112 build_scriptdir = $(scriptdir)
113 endif
114
115 AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
116                                 @GNUTLS_CFLAGS@ $(builtin_cflags) \
117                                 -DCONNMAN_PLUGIN_BUILTIN \
118                                 -DSTATEDIR=\""$(statedir)"\" \
119                                 -DPLUGINDIR=\""$(build_plugindir)"\" \
120                                 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
121                                 -DSTORAGEDIR=\""$(storagedir)\"" \
122                                 -DCONFIGDIR=\""$(configdir)\""
123
124 INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
125
126 EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf \
127                                                 plugins/connman-nmcompat.conf
128
129
130 script_DATA =
131 script_PROGRAMS =
132 script_LTLIBRARIES =
133
134 include Makefile.plugins
135
136 if CLIENT
137 noinst_PROGRAMS += client/cm
138
139 client_cm_SOURCES = client/main.c
140 client_cm_LDADD = @DBUS_LIBS@
141 endif
142
143 if WISPR
144 noinst_PROGRAMS += tools/wispr
145
146 tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
147 tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
148 endif
149
150 if TOOLS
151 noinst_PROGRAMS += tools/supplicant-test \
152                         tools/dhcp-test tools/dhcp-server-test \
153                         tools/addr-test tools/web-test tools/resolv-test \
154                         tools/dbus-test tools/polkit-test \
155                         tools/iptables-test tools/tap-test tools/wpad-test \
156                         tools/stats-tool tools/private-network-test \
157                         unit/test-session unit/test-ippool unit/test-nat
158
159 tools_supplicant_test_SOURCES = $(gdbus_sources) tools/supplicant-test.c \
160                         tools/supplicant-dbus.h tools/supplicant-dbus.c \
161                         tools/supplicant.h tools/supplicant.c
162 tools_supplicant_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
163
164 tools_web_test_SOURCES = $(gweb_sources) tools/web-test.c
165 tools_web_test_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
166
167 tools_resolv_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/resolv-test.c
168 tools_resolv_test_LDADD = @GLIB_LIBS@ -lresolv
169
170 tools_wpad_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/wpad-test.c
171 tools_wpad_test_LDADD = @GLIB_LIBS@ -lresolv
172
173 tools_stats_tool_LDADD = @GLIB_LIBS@
174
175 tools_dhcp_test_SOURCES = $(gdhcp_sources) tools/dhcp-test.c
176 tools_dhcp_test_LDADD = @GLIB_LIBS@
177
178 tools_dhcp_server_test_SOURCES = $(gdhcp_sources) tools/dhcp-server-test.c
179 tools_dhcp_server_test_LDADD = @GLIB_LIBS@
180
181 tools_dbus_test_SOURCES = $(gdbus_sources) tools/dbus-test.c
182 tools_dbus_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
183
184 tools_polkit_test_LDADD = @DBUS_LIBS@
185
186 tools_iptables_test_LDADD = @GLIB_LIBS@ @XTABLES_LIBS@
187
188 tools_private_network_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
189
190 unit_test_session_SOURCES = $(gdbus_sources) src/log.c src/dbus.c \
191                 unit/test-session.c unit/utils.c unit/manager-api.c \
192                 unit/session-api.c unit/test-connman.h
193 unit_test_session_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -ldl
194 unit_objects += $(unit_test_session_OBJECTS)
195
196 unit_test_ippool_SOURCES = $(gdbus_sources) src/log.c src/dbus.c \
197                  src/ippool.c unit/test-ippool.c
198 unit_test_ippool_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -ldl
199 unit_objects += $(unit_test_ippool_OBJECTS)
200
201 unit_test_nat_SOURCES = $(gdbus_sources) src/log.c src/dbus.c \
202                 src/iptables.c  src/nat.c unit/test-nat.c
203 unit_test_nat_LDADD = @GLIB_LIBS@ @DBUS_LIBS@  @XTABLES_LIBS@ -ldl
204 unit_objects += $(unit_nat_ippool_OBJECTS)
205 endif
206
207 test_scripts = test/get-state test/list-services \
208                 test/monitor-services test/test-clock \
209                 test/simple-agent test/show-introspection test/test-compat \
210                 test/test-manager test/test-connman test/monitor-connman \
211                 test/connect-vpn test/disconnect-vpn \
212                 test/test-counter test/set-ipv4-method test/set-ipv6-method \
213                 test/get-services test/get-proxy-autoconfig test/set-proxy \
214                 test/enable-tethering test/disable-tethering test/backtrace \
215                 test/test-session test/test-supplicant \
216                 test/test-new-supplicant test/service-move-before \
217                 test/set-global-timeservers test/get-global-timeservers \
218                 test/set-nameservers test/set-domains
219
220 if TEST
221 testdir = $(pkglibdir)/test
222 test_SCRIPTS = $(test_scripts)
223 endif
224
225 EXTRA_DIST += $(test_scripts)
226
227 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
228                                 doc/ipconfig-api.txt doc/plugin-api.txt \
229                                 doc/manager-api.txt doc/agent-api.txt \
230                                 doc/service-api.txt doc/technology-api.txt \
231                                 doc/counter-api.txt doc/config-format.txt \
232                                 doc/clock-api.txt doc/session-api.txt \
233                                 doc/session-overview.txt doc/backtrace.txt \
234                                 doc/advanced-configuration.txt
235
236
237 pkgconfigdir = $(libdir)/pkgconfig
238
239 pkgconfig_DATA = connman.pc
240
241 DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \
242                                 --disable-datafiles \
243                                 --enable-hh2serial-gps \
244                                 --enable-openconnect \
245                                 --enable-openvpn \
246                                 --enable-vpnc \
247                                 --enable-nmcompat \
248                                 --enable-polkit
249
250 DISTCLEANFILES = $(pkgconfig_DATA)
251
252 MAINTAINERCLEANFILES = Makefile.in \
253         aclocal.m4 configure config.h.in config.sub config.guess \
254         ltmain.sh depcomp compile missing install-sh mkinstalldirs
255
256
257 src/builtin.h: src/genbuiltin $(builtin_sources)
258         $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
259
260 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
261 if POLKIT
262         $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
263 else
264         $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
265 endif
266
267 include/connman/version.h: include/version.h
268         $(AM_V_at)$(MKDIR_P) include/connman
269         $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
270
271 include/connman/%.h: $(abs_top_srcdir)/include/%.h
272         $(AM_V_at)$(MKDIR_P) include/connman
273         $(AM_V_GEN)$(LN_S) $< $@
274
275 clean-local:
276         @$(RM) -rf include/connman