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
70 systemdunit_DATA += vpn/connman-vpn.service
90 sbin_PROGRAMS = src/connmand
92 src_connmand_SOURCES = $(gdhcp_sources) $(gweb_sources) \
93 $(builtin_sources) $(shared_sources) src/connman.ver \
94 src/main.c src/connman.h src/log.c \
95 src/error.c src/plugin.c src/task.c \
96 src/device.c src/network.c src/connection.c \
97 src/manager.c src/service.c \
98 src/clock.c src/timezone.c src/agent-connman.c \
99 src/agent.c src/notifier.c src/provider.c \
100 src/resolver.c src/ipconfig.c src/detect.c src/inet.c \
101 src/dhcp.c src/dhcpv6.c src/rtnl.c src/proxy.c \
102 src/utsname.c src/timeserver.c src/rfkill.c \
103 src/storage.c src/dbus.c src/config.c \
104 src/technology.c src/counter.c src/ntp.c \
105 src/session.c src/tethering.c src/wpad.c src/wispr.c \
106 src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c \
107 src/ippool.c src/bridge.c src/nat.c src/ipaddress.c \
108 src/inotify.c src/firewall.c src/ipv6pd.c src/peer.c \
109 src/peer_service.c src/machine.c
111 src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
112 @GLIB_LIBS@ @DBUS_LIBS@ @XTABLES_LIBS@ @GNUTLS_LIBS@ \
115 src_connmand_LDFLAGS = -Wl,--export-dynamic \
116 -Wl,--version-script=$(srcdir)/src/connman.ver
119 vpn_plugin_LTLIBRARIES =
123 builtin_vpn_modules =
124 builtin_vpn_sources =
128 sbin_PROGRAMS += vpn/connman-vpnd
130 vpn_connman_vpnd_SOURCES = $(builtin_vpn_sources) \
131 $(gweb_sources) vpn/vpn.ver vpn/main.c vpn/vpn.h \
132 src/log.c src/error.c src/plugin.c src/task.c \
133 vpn/vpn-manager.c vpn/vpn-provider.c \
134 vpn/vpn-provider.h vpn/vpn-rtnl.h \
135 vpn/vpn-ipconfig.c src/inet.c vpn/vpn-rtnl.c \
136 src/dbus.c src/storage.c src/ipaddress.c src/agent.c \
137 vpn/vpn-agent.c vpn/vpn-agent.h src/inotify.c \
140 vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
141 @GLIB_LIBS@ @DBUS_LIBS@ @GNUTLS_LIBS@ \
144 vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
145 -Wl,--version-script=$(srcdir)/vpn/vpn.ver
148 BUILT_SOURCES = $(local_headers) src/builtin.h
151 BUILT_SOURCES += vpn/builtin.h
154 CLEANFILES = src/connman.conf $(BUILT_SOURCES)
156 statedir = $(localstatedir)/run/connman
157 vpn_statedir = $(localstatedir)/run/connman-vpn
160 vpn_plugindir = $(libdir)/connman/plugins-vpn
163 plugindir = $(libdir)/connman/plugins
165 scriptdir = $(libdir)/connman/scripts
167 storagedir = $(localstatedir)/lib/connman
168 vpn_storagedir = $(localstatedir)/lib/connman-vpn
170 configdir = ${sysconfdir}/connman
174 build_vpn_plugindir = $(abs_top_srcdir)/vpn/plugins/.libs
176 build_plugindir = $(abs_top_srcdir)/plugins/.libs
177 build_scriptdir = $(abs_top_srcdir)/scripts
179 build_plugindir = $(plugindir)
180 build_scriptdir = $(scriptdir)
182 build_vpn_plugindir = $(vpn_plugindir)
186 AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
187 @GNUTLS_CFLAGS@ $(builtin_cflags) \
188 -DCONNMAN_PLUGIN_BUILTIN \
189 -DSTATEDIR=\""$(statedir)"\" \
190 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
191 -DPLUGINDIR=\""$(build_plugindir)"\" \
192 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
193 -DSTORAGEDIR=\""$(storagedir)\"" \
194 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
195 -DCONFIGDIR=\""$(configdir)\""
198 AM_CPPFLAGS = -I$(builddir)/include -I$(srcdir)/gdbus
200 AM_CPPFLAGS = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
203 src_connmand_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
204 @GNUTLS_CFLAGS@ $(builtin_cflags) \
205 -DCONNMAN_PLUGIN_BUILTIN \
206 -DSTATEDIR=\""$(statedir)"\" \
207 -DPLUGINDIR=\""$(build_plugindir)"\" \
208 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
209 -DSTORAGEDIR=\""$(storagedir)\"" \
210 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
211 -DCONFIGDIR=\""$(configdir)\"" \
214 EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf \
215 plugins/connman-nmcompat.conf
218 vpn_connman_vpnd_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ \
219 $(builtin_vpn_cflags) \
220 -DCONNMAN_PLUGIN_BUILTIN \
221 -DVPN_STATEDIR=\""$(vpn_statedir)"\" \
222 -DPLUGINDIR=\""$(build_vpn_plugindir)"\" \
223 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
224 -DSTORAGEDIR=\""$(storagedir)\"" \
225 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
226 -DCONFIGDIR=\""$(configdir)\"" \
231 EXTRA_DIST += vpn/vpn-dbus.conf vpn/vpn-polkit.conf
237 include Makefile.plugins
240 sbin_PROGRAMS += client/connmanctl
242 noinst_MANUAL_PAGES = doc/connmanctl.1
244 client_connmanctl_SOURCES = client/dbus_helpers.h client/dbus_helpers.c \
245 client/services.h client/services.c \
246 client/commands.h client/commands.c \
247 client/input.h client/input.c \
248 client/agent.h client/agent.c \
249 client/peers.h client/peers.c \
250 client/vpnconnections.h client/vpnconnections.c \
253 client_connmanctl_LDADD = gdbus/libgdbus-internal.la @DBUS_LIBS@ @GLIB_LIBS@ \
257 noinst_PROGRAMS += unit/test-pbkdf2-sha1 unit/test-prf-sha1 unit/test-ippool
259 unit_test_pbkdf2_sha1_SOURCES = unit/test-pbkdf2-sha1.c \
260 src/shared/sha1.h src/shared/sha1.c
261 unit_test_pbkdf2_sha1_LDADD = @GLIB_LIBS@
263 unit_test_prf_sha1_SOURCES = unit/test-prf-sha1.c \
264 src/shared/sha1.h src/shared/sha1.c
265 unit_test_prf_sha1_LDADD = @GLIB_LIBS@
267 unit_test_ippool_SOURCES = src/log.c src/dbus.c src/error.c \
268 src/ippool.c unit/test-ippool.c
269 unit_test_ippool_LDADD = gdbus/libgdbus-internal.la \
270 @GLIB_LIBS@ @DBUS_LIBS@ -ldl
272 TESTS = unit/test-pbkdf2-sha1 unit/test-prf-sha1 unit/test-ippool
275 noinst_PROGRAMS += tools/wispr
277 tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
278 tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
282 noinst_PROGRAMS += tools/supplicant-test \
283 tools/dhcp-test tools/dhcp-server-test \
284 tools/addr-test tools/web-test tools/resolv-test \
285 tools/dbus-test tools/polkit-test \
286 tools/iptables-test tools/tap-test tools/wpad-test \
287 tools/stats-tool tools/private-network-test \
288 tools/session-test tools/iptables-unit \
289 tools/dnsproxy-test tools/netlink-test
291 tools_supplicant_test_SOURCES = tools/supplicant-test.c \
292 tools/supplicant-dbus.h tools/supplicant-dbus.c \
293 tools/supplicant.h tools/supplicant.c
294 tools_supplicant_test_LDADD = gdbus/libgdbus-internal.la \
295 @GLIB_LIBS@ @DBUS_LIBS@
297 tools_web_test_SOURCES = $(gweb_sources) tools/web-test.c
298 tools_web_test_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
300 tools_resolv_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/resolv-test.c
301 tools_resolv_test_LDADD = @GLIB_LIBS@ -lresolv
303 tools_wpad_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/wpad-test.c
304 tools_wpad_test_LDADD = @GLIB_LIBS@ -lresolv
306 tools_stats_tool_LDADD = @GLIB_LIBS@
308 tools_dhcp_test_SOURCES = $(gdhcp_sources) tools/dhcp-test.c
309 tools_dhcp_test_LDADD = @GLIB_LIBS@
311 tools_dhcp_server_test_SOURCES = $(gdhcp_sources) tools/dhcp-server-test.c
312 tools_dhcp_server_test_LDADD = @GLIB_LIBS@
314 tools_dbus_test_SOURCES = tools/dbus-test.c
315 tools_dbus_test_LDADD = gdbus/libgdbus-internal.la @GLIB_LIBS@ @DBUS_LIBS@
317 tools_polkit_test_LDADD = @DBUS_LIBS@
319 tools_iptables_test_SOURCES = src/log.c src/iptables.c tools/iptables-test.c
320 tools_iptables_test_LDADD = @GLIB_LIBS@ @XTABLES_LIBS@ -ldl
322 tools_private_network_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
324 tools_session_test_SOURCES = src/log.c src/dbus.c src/error.c \
325 tools/session-test.c tools/session-utils.c tools/manager-api.c \
326 tools/session-api.c tools/session-test.h
327 tools_session_test_LDADD = gdbus/libgdbus-internal.la \
328 @GLIB_LIBS@ @DBUS_LIBS@ -ldl
330 tools_iptables_unit_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
331 -DIPTABLES_SAVE=\""${IPTABLES_SAVE}"\"
332 tools_iptables_unit_SOURCES = src/log.c \
333 src/iptables.c src/firewall.c src/nat.c tools/iptables-unit.c
334 tools_iptables_unit_LDADD = gdbus/libgdbus-internal.la \
335 @GLIB_LIBS@ @DBUS_LIBS@ @XTABLES_LIBS@ -ldl
337 tools_dnsproxy_test_SOURCES = tools/dnsproxy-test.c
338 tools_dnsproxy_test_LDADD = @GLIB_LIBS@
340 tools_netlink_test_SOURCES =$(shared_sources) tools/netlink-test.c
341 tools_netlink_test_LDADD = @GLIB_LIBS@
345 test_scripts = test/get-state test/list-services \
346 test/monitor-services test/test-clock \
347 test/simple-agent test/show-introspection test/test-compat \
348 test/test-manager test/test-connman test/monitor-connman \
349 test/connect-provider test/remove-provider \
350 test/test-counter test/set-ipv4-method test/set-ipv6-method \
351 test/get-services test/get-proxy-autoconfig test/set-proxy \
352 test/enable-tethering test/disable-tethering test/backtrace \
353 test/test-session test/p2p-on-supplicant \
354 test/test-new-supplicant test/service-move-before \
355 test/set-global-timeservers test/get-global-timeservers \
356 test/set-nameservers test/set-domains test/set-timeservers \
359 test_scripts += test/vpn-connect test/vpn-disconnect test/vpn-get \
360 test/monitor-vpn test/vpn-property
363 testdir = $(pkglibdir)/test
364 test_SCRIPTS = $(test_scripts)
367 EXTRA_DIST += $(test_scripts)
369 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
370 doc/ipconfig-api.txt doc/plugin-api.txt \
371 doc/manager-api.txt doc/agent-api.txt \
372 doc/service-api.txt doc/technology-api.txt \
373 doc/counter-api.txt doc/config-format.txt \
374 doc/clock-api.txt doc/session-api.txt \
375 doc/session-overview.txt doc/backtrace.txt \
376 doc/advanced-configuration.txt \
377 doc/vpn-connection-api.txt \
378 doc/vpn-manager-api.txt doc/vpn-overview.txt \
379 doc/session-policy-format.txt
381 EXTRA_DIST += src/main.conf \
384 MANUAL_PAGES += doc/connman.8 doc/connman.conf.5
386 dist_man_MANS = $(MANUAL_PAGES)
388 pkgconfigdir = $(libdir)/pkgconfig
390 pkgconfig_DATA = connman.pc
392 DISTCHECK_CONFIGURE_FLAGS = --disable-datafiles \
393 --enable-hh2serial-gps \
394 --enable-openconnect \
397 --enable-session-policy-local \
401 DISTCLEANFILES = $(pkgconfig_DATA)
403 MAINTAINERCLEANFILES = Makefile.in \
404 aclocal.m4 configure config.h.in config.sub config.guess \
405 ltmain.sh depcomp compile missing install-sh mkinstalldirs
408 src/builtin.h: src/genbuiltin $(builtin_sources)
409 $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
411 vpn/builtin.h: src/genbuiltin $(builtin_vpn_sources)
412 $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_vpn_modules) > $@
414 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
416 $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
418 $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
422 vpn/connman-vpn-dbus.conf: vpn/vpn-dbus.conf vpn/vpn-polkit.conf
424 $(AM_V_GEN)cp $(srcdir)/vpn/vpn-polkit.conf $@
426 $(AM_V_GEN)cp $(srcdir)/vpn/vpn-dbus.conf $@
432 EXTRA_DIST += connman-task.pp
433 CLEANFILES += connman-task.pp
436 connman-task.pp: vpn/connman-task.te
437 make -f /usr/share/selinux/devel/Makefile
440 EXTRA_DIST += vpn/connman-task.te
442 include/connman/version.h: include/version.h
443 $(AM_V_at)$(MKDIR_P) include/connman
444 $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
446 include/connman/%.h: $(abs_top_srcdir)/include/%.h
447 $(AM_V_at)$(MKDIR_P) include/connman
448 $(AM_V_GEN)$(LN_S) $< $@
451 @$(RM) -rf include/connman