2 AM_MAKEFLAGS = --no-print-directory
6 includedir = @includedir@/connman
8 include_HEADERS = include/log.h include/plugin.h \
9 include/notifier.h include/service.h \
10 include/resolver.h include/ipconfig.h \
11 include/device.h include/network.h include/inet.h \
12 include/storage.h include/provision.h \
13 include/session.h include/ipaddress.h include/agent.h \
14 include/inotify.h include/peer.h include/machine.h
16 nodist_include_HEADERS = include/version.h
18 noinst_HEADERS = include/rtnl.h include/task.h \
19 include/dbus.h include/option.h \
20 include/provider.h include/vpn-dbus.h \
21 include/utsname.h include/timeserver.h include/proxy.h \
22 include/technology.h include/setting.h
24 local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS) \
25 $(noinst_HEADERS), include/connman/$(notdir $(file)))
28 noinst_LTLIBRARIES += gdbus/libgdbus-internal.la
30 gdbus_libgdbus_internal_la_SOURCES = gdbus/gdbus.h \
31 gdbus/mainloop.c gdbus/watch.c \
32 gdbus/object.c gdbus/client.c gdbus/polkit.c
34 gdhcp_sources = gdhcp/gdhcp.h gdhcp/common.h gdhcp/common.c gdhcp/client.c \
35 gdhcp/server.c gdhcp/ipv4ll.h gdhcp/ipv4ll.c gdhcp/unaligned.h
37 gweb_sources = gweb/gweb.h gweb/gweb.c gweb/gresolv.h gweb/gresolv.c
40 gweb_sources += gweb/giognutls.h gweb/giognutls.c
42 gweb_sources += gweb/giognutls.h gweb/gionotls.c
45 shared_sources = src/shared/util.h src/shared/util.c \
46 src/shared/netlink.h src/shared/netlink.c
51 nmcompat_conf = plugins/connman-nmcompat.conf
54 dbusconfdir = @DBUS_CONFDIR@
56 dbusconf_DATA = src/connman.conf $(nmcompat_conf)
59 dbusconf_DATA += vpn/connman-vpn-dbus.conf
60 dbusservicedir = @DBUS_DATADIR@
61 dbusservice_DATA = vpn/net.connman.vpn.service
65 systemdunitdir = @SYSTEMD_UNITDIR@
67 systemdunit_DATA = src/connman.service
72 service_files_sources = src/connman.service.in src/net.connman.service.in \
73 vpn/net.connman.vpn.service.in
74 service_files = src/connman.service src/net.connman.service \
75 vpn/net.connman.vpn.service
93 sbin_PROGRAMS = src/connmand
95 src_connmand_SOURCES = $(gdhcp_sources) $(gweb_sources) \
96 $(builtin_sources) $(shared_sources) src/connman.ver \
97 src/main.c src/connman.h src/log.c \
98 src/error.c src/plugin.c src/task.c \
99 src/device.c src/network.c src/connection.c \
100 src/manager.c src/service.c \
101 src/clock.c src/timezone.c src/agent-connman.c \
102 src/agent.c src/notifier.c src/provider.c \
103 src/resolver.c src/ipconfig.c src/detect.c src/inet.c \
104 src/dhcp.c src/dhcpv6.c src/rtnl.c src/proxy.c \
105 src/utsname.c src/timeserver.c src/rfkill.c \
106 src/storage.c src/dbus.c src/config.c \
107 src/technology.c src/counter.c src/ntp.c \
108 src/session.c src/tethering.c src/wpad.c src/wispr.c \
109 src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c \
110 src/ippool.c src/bridge.c src/nat.c src/ipaddress.c \
111 src/inotify.c src/firewall.c src/ipv6pd.c src/peer.c \
112 src/peer_service.c src/machine.c src/util.c
114 src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
115 @GLIB_LIBS@ @DBUS_LIBS@ @XTABLES_LIBS@ @GNUTLS_LIBS@ \
119 src_connmand_LDFLAGS = -Wl,--export-dynamic \
120 -Wl,--version-script=$(srcdir)/src/connman.ver
123 vpn_plugin_LTLIBRARIES =
127 builtin_vpn_modules =
128 builtin_vpn_sources =
132 sbin_PROGRAMS += vpn/connman-vpnd
134 vpn_connman_vpnd_SOURCES = $(gdhcp_sources) $(builtin_vpn_sources) \
135 $(gweb_sources) vpn/vpn.ver vpn/main.c vpn/vpn.h \
136 vpn/vpn-manager.c vpn/vpn-provider.c \
137 vpn/vpn-provider.h vpn/vpn-rtnl.h \
138 vpn/vpn-ipconfig.c src/inet.c vpn/vpn-rtnl.c \
139 src/log.c src/error.c src/plugin.c src/task.c \
140 src/device.c src/network.c src/connection.c \
141 src/manager.c src/service.c \
142 src/clock.c src/timezone.c src/agent-connman.c \
143 src/agent.c src/notifier.c src/provider.c \
144 src/resolver.c src/ipconfig.c src/detect.c \
145 src/dhcp.c src/dhcpv6.c src/rtnl.c src/proxy.c \
146 src/utsname.c src/timeserver.c src/rfkill.c \
147 src/storage.c src/dbus.c src/config.c \
148 src/technology.c src/counter.c src/ntp.c \
149 src/session.c src/tethering.c src/wpad.c src/wispr.c \
150 src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c \
151 src/ippool.c src/bridge.c src/nat.c src/ipaddress.c \
152 src/inotify.c src/firewall.c src/ipv6pd.c src/peer.c \
153 src/peer_service.c src/machine.c src/util.c \
154 vpn/vpn-agent.c vpn/vpn-agent.h \
157 vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
158 @GLIB_LIBS@ @DBUS_LIBS@ @XTABLES_LIBS@ @GNUTLS_LIBS@ \
162 vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
163 -Wl,--version-script=$(srcdir)/vpn/vpn.ver
166 BUILT_SOURCES = $(local_headers) src/builtin.h $(service_files) scripts/connman
169 BUILT_SOURCES += vpn/builtin.h
172 CLEANFILES = src/connman.conf $(BUILT_SOURCES) $(service_files)
174 statedir = $(localstatedir)/run/connman
175 vpn_statedir = $(localstatedir)/run/connman-vpn
178 vpn_plugindir = $(libdir)/connman/plugins-vpn
181 plugindir = $(libdir)/connman/plugins
183 scriptdir = $(libdir)/connman/scripts
185 storagedir = $(localstatedir)/lib/connman
186 vpn_storagedir = $(localstatedir)/lib/connman-vpn
188 configdir = ${sysconfdir}/connman
192 build_vpn_plugindir = $(abs_top_srcdir)/vpn/plugins/.libs
194 build_plugindir = $(abs_top_srcdir)/plugins/.libs
195 build_scriptdir = $(abs_top_srcdir)/scripts
197 build_plugindir = $(plugindir)
198 build_scriptdir = $(scriptdir)
200 build_vpn_plugindir = $(vpn_plugindir)
204 AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
205 @GNUTLS_CFLAGS@ @TPKP_GNUTLS_CFLAGS@ $(builtin_cflags) \
206 -DCONNMAN_PLUGIN_BUILTIN \
207 -DSTATEDIR=\""$(statedir)"\" \
208 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
209 -DPLUGINDIR=\""$(build_plugindir)"\" \
210 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
211 -DSTORAGEDIR=\""$(storagedir)\"" \
212 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
213 -DCONFIGDIR=\""$(configdir)\""
216 AM_CPPFLAGS = @TPKP_GNUTLS_CFLAGS@ -I$(builddir)/include -I$(srcdir)/gdbus
218 AM_CPPFLAGS = @TPKP_GNUTLS_CFLAGS@ -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
221 src_connmand_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
222 @GNUTLS_CFLAGS@ @TPKP_GNUTLS_CFLAGS@ $(builtin_cflags) \
223 -DCONNMAN_PLUGIN_BUILTIN \
224 -DSTATEDIR=\""$(statedir)"\" \
225 -DPLUGINDIR=\""$(build_plugindir)"\" \
226 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
227 -DSTORAGEDIR=\""$(storagedir)\"" \
228 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
229 -DCONFIGDIR=\""$(configdir)\"" \
232 EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf \
233 plugins/connman-nmcompat.conf \
234 $(service_files_sources) scripts/connman.in
237 vpn_connman_vpnd_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
238 $(builtin_vpn_cflags) \
239 -DCONNMAN_PLUGIN_BUILTIN \
240 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
241 -DPLUGINDIR=\""$(build_vpn_plugindir)"\" \
242 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
243 -DSTORAGEDIR=\""$(storagedir)\"" \
244 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
245 -DCONFIGDIR=\""$(configdir)\"" \
250 EXTRA_DIST += vpn/vpn-dbus.conf vpn/vpn-polkit.conf
256 include Makefile.plugins
259 bin_PROGRAMS += client/connmanctl
261 MANUAL_PAGES = doc/connmanctl.1
263 client_connmanctl_SOURCES = client/dbus_helpers.h client/dbus_helpers.c \
264 client/services.h client/services.c \
265 client/commands.h client/commands.c \
266 client/input.h client/input.c \
267 client/agent.h client/agent.c \
268 client/peers.h client/peers.c \
269 client/vpnconnections.h client/vpnconnections.c \
272 client_connmanctl_LDADD = gdbus/libgdbus-internal.la @DBUS_LIBS@ @GLIB_LIBS@ \
273 -lreadline -ldl -lncurses
276 noinst_PROGRAMS += unit/test-ippool
278 unit_test_ippool_SOURCES = src/log.c src/dbus.c src/error.c \
279 src/ippool.c unit/test-ippool.c
280 unit_test_ippool_LDADD = gdbus/libgdbus-internal.la \
281 @GLIB_LIBS@ @DBUS_LIBS@ -ldl
283 TESTS = unit/test-ippool
286 noinst_PROGRAMS += tools/wispr
288 tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
289 tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ @TPKP_GNUTLS_LIBS@ -lresolv
293 noinst_PROGRAMS += tools/supplicant-test \
294 tools/dhcp-test tools/dhcp-server-test \
295 tools/addr-test tools/web-test tools/resolv-test \
296 tools/dbus-test tools/polkit-test \
297 tools/iptables-test tools/tap-test tools/wpad-test \
298 tools/stats-tool tools/private-network-test \
299 tools/session-test tools/iptables-unit \
300 tools/dnsproxy-test tools/netlink-test
302 tools_supplicant_test_SOURCES = tools/supplicant-test.c \
303 tools/supplicant-dbus.h tools/supplicant-dbus.c \
304 tools/supplicant.h tools/supplicant.c
305 tools_supplicant_test_LDADD = gdbus/libgdbus-internal.la \
306 @GLIB_LIBS@ @DBUS_LIBS@
308 tools_web_test_SOURCES = $(gweb_sources) tools/web-test.c
309 tools_web_test_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ @TPKP_GNUTLS_LIBS@ -lresolv
311 tools_resolv_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/resolv-test.c
312 tools_resolv_test_LDADD = @GLIB_LIBS@ -lresolv
314 tools_wpad_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/wpad-test.c
315 tools_wpad_test_LDADD = @GLIB_LIBS@ -lresolv
317 tools_stats_tool_LDADD = @GLIB_LIBS@
319 tools_dhcp_test_SOURCES = $(gdhcp_sources) tools/dhcp-test.c
320 tools_dhcp_test_LDADD = @GLIB_LIBS@
322 tools_dhcp_server_test_SOURCES = $(gdhcp_sources) tools/dhcp-server-test.c
323 tools_dhcp_server_test_LDADD = @GLIB_LIBS@
325 tools_dbus_test_SOURCES = tools/dbus-test.c
326 tools_dbus_test_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
328 tools_polkit_test_LDADD = @DBUS_LIBS@
330 tools_iptables_test_SOURCES = src/log.c src/iptables.c tools/iptables-test.c
331 tools_iptables_test_LDADD = @GLIB_LIBS@ @XTABLES_LIBS@ -ldl
333 tools_private_network_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
335 tools_session_test_SOURCES = src/log.c src/dbus.c src/error.c \
336 tools/session-test.c tools/session-utils.c tools/manager-api.c \
337 tools/session-api.c tools/session-test.h
338 tools_session_test_LDADD = gdbus/libgdbus-internal.la \
339 @GLIB_LIBS@ @DBUS_LIBS@ -ldl
341 tools_iptables_unit_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
342 -DIPTABLES_SAVE=\""${IPTABLES_SAVE}"\"
343 tools_iptables_unit_SOURCES = src/log.c \
344 src/iptables.c src/firewall.c src/nat.c tools/iptables-unit.c
345 tools_iptables_unit_LDADD = gdbus/libgdbus-internal.la \
346 @GLIB_LIBS@ @DBUS_LIBS@ @XTABLES_LIBS@ -ldl
348 tools_dnsproxy_test_SOURCES = tools/dnsproxy-test.c
349 tools_dnsproxy_test_LDADD = @GLIB_LIBS@
351 tools_netlink_test_SOURCES =$(shared_sources) tools/netlink-test.c
352 tools_netlink_test_LDADD = @GLIB_LIBS@
356 test_scripts = test/get-state test/list-services \
357 test/monitor-services test/test-clock \
358 test/simple-agent test/show-introspection test/test-compat \
359 test/test-manager test/test-connman test/monitor-connman \
360 test/connect-provider test/remove-provider \
361 test/test-counter test/set-ipv4-method test/set-ipv6-method \
362 test/get-services test/get-proxy-autoconfig test/set-proxy \
363 test/enable-tethering test/disable-tethering test/backtrace \
364 test/test-session test/p2p-on-supplicant \
365 test/test-new-supplicant test/service-move-before \
366 test/set-global-timeservers test/get-global-timeservers \
367 test/set-nameservers test/set-domains test/set-timeservers \
370 test_scripts += test/vpn-connect test/vpn-disconnect test/vpn-get \
371 test/monitor-vpn test/vpn-property
374 testdir = $(pkglibdir)/test
375 test_SCRIPTS = $(test_scripts)
378 EXTRA_DIST += $(test_scripts)
380 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
381 doc/coding-style.txt doc/wifi-p2p-overview.txt \
382 doc/vpn-agent-api.txt doc/peer-api.txt \
383 doc/ipconfig-api.txt doc/plugin-api.txt \
384 doc/manager-api.txt doc/agent-api.txt \
385 doc/service-api.txt doc/technology-api.txt \
386 doc/counter-api.txt doc/config-format.txt \
387 doc/clock-api.txt doc/session-api.txt \
388 doc/session-overview.txt doc/backtrace.txt \
389 doc/advanced-configuration.txt \
390 doc/vpn-config-format.txt \
391 doc/vpn-connection-api.txt \
392 doc/vpn-manager-api.txt doc/vpn-overview.txt \
393 doc/session-policy-format.txt
395 EXTRA_DIST += src/main.conf \
398 MANUAL_PAGES += doc/connman.8 doc/connman.conf.5
400 dist_man_MANS = $(MANUAL_PAGES)
402 pkgconfigdir = $(libdir)/pkgconfig
404 pkgconfig_DATA = connman.pc
406 DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles \
407 --enable-hh2serial-gps \
408 --enable-openconnect \
411 --enable-session-policy-local \
415 DISTCLEANFILES = $(pkgconfig_DATA)
417 MAINTAINERCLEANFILES = Makefile.in \
418 aclocal.m4 configure config.h.in config.sub config.guess \
419 ltmain.sh depcomp compile missing install-sh mkinstalldirs test-driver
422 src/builtin.h: src/genbuiltin $(builtin_sources)
423 $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
425 vpn/builtin.h: src/genbuiltin $(builtin_vpn_sources)
426 $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_vpn_modules) > $@
428 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
430 $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
432 $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
436 vpn/connman-vpn-dbus.conf: vpn/vpn-dbus.conf vpn/vpn-polkit.conf
438 $(AM_V_GEN)cp $(srcdir)/vpn/vpn-polkit.conf $@
440 $(AM_V_GEN)cp $(srcdir)/vpn/vpn-dbus.conf $@
446 EXTRA_DIST += connman-task.pp
447 CLEANFILES += connman-task.pp
450 connman-task.pp: vpn/connman-task.te
451 make -f /usr/share/selinux/devel/Makefile
454 EXTRA_DIST += vpn/connman-task.te
456 do_subst = $(AM_V_GEN)$(SED) \
457 -e 's,[@]prefix[@],$(prefix),g' \
458 -e 's,[@]sbindir[@],$(sbindir),g' \
459 -e 's,[@]sysconfdir[@],$(sysconfdir),g'
461 %.service: %.service.in Makefile
462 $(do_subst) < $< > $@
464 scripts/connman: scripts/connman.in Makefile
465 $(do_subst) < $< > $@
467 include/connman/version.h: include/version.h
468 $(AM_V_at)$(MKDIR_P) include/connman
469 $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
471 include/connman/%.h: $(abs_top_srcdir)/include/%.h
472 $(AM_V_at)$(MKDIR_P) include/connman
473 $(AM_V_GEN)$(LN_S) $< $@
476 @$(RM) -rf include/connman