2 AM_MAKEFLAGS = --no-print-directory
4 includedir = @includedir@/connman
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 include/provision.h \
11 include/session.h include/ipaddress.h include/agent.h \
14 nodist_include_HEADERS = include/version.h
16 noinst_HEADERS = include/rtnl.h include/task.h \
17 include/dbus.h include/option.h \
18 include/provider.h include/vpn-dbus.h \
19 include/utsname.h include/timeserver.h include/proxy.h \
20 include/technology.h include/setting.h
22 local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS) \
23 $(noinst_HEADERS), include/connman/$(notdir $(file)))
26 gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
27 gdbus/object.c gdbus/client.c gdbus/polkit.c
29 gdhcp_sources = gdhcp/gdhcp.h gdhcp/common.h gdhcp/common.c gdhcp/client.c \
30 gdhcp/server.c gdhcp/ipv4ll.h gdhcp/ipv4ll.c gdhcp/unaligned.h
32 gweb_sources = gweb/gweb.h gweb/gweb.c gweb/gresolv.h gweb/gresolv.c
35 gweb_sources += gweb/giognutls.h gweb/giognutls.c
37 gweb_sources += gweb/giognutls.h gweb/gionotls.c
43 nmcompat_conf = plugins/connman-nmcompat.conf
46 dbusconfdir = @DBUS_CONFDIR@
48 dbusconf_DATA = src/connman.conf $(nmcompat_conf)
51 dbusconf_DATA += vpn/connman-vpn-dbus.conf
52 dbusservicedir = @DBUS_DATADIR@
53 dbusservice_DATA = vpn/net.connman.vpn.service
57 systemdunitdir = @SYSTEMD_UNITDIR@
59 systemdunit_DATA = src/connman.service
62 systemdunit_DATA += vpn/connman-vpn.service
82 sbin_PROGRAMS = src/connmand
84 src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) $(gweb_sources) \
85 $(builtin_sources) src/connman.ver \
86 src/main.c src/connman.h src/log.c \
87 src/error.c src/plugin.c src/task.c \
88 src/device.c src/network.c src/connection.c \
89 src/manager.c src/service.c \
90 src/clock.c src/timezone.c src/agent-connman.c \
91 src/agent.c src/notifier.c src/provider.c \
92 src/resolver.c src/ipconfig.c src/detect.c src/inet.c \
93 src/dhcp.c src/dhcpv6.c src/rtnl.c src/proxy.c \
94 src/utsname.c src/timeserver.c src/rfkill.c \
95 src/storage.c src/dbus.c src/config.c \
96 src/technology.c src/counter.c src/ntp.c \
97 src/session.c src/tethering.c src/wpad.c src/wispr.c \
98 src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c \
99 src/ippool.c src/bridge.c src/nat.c src/ipaddress.c \
100 src/inotify.c src/firewall.c
102 src_connmand_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ \
103 @XTABLES_LIBS@ @GNUTLS_LIBS@ -lresolv -ldl -lrt
105 src_connmand_LDFLAGS = -Wl,--export-dynamic \
106 -Wl,--version-script=$(srcdir)/src/connman.ver
109 vpn_plugin_LTLIBRARIES =
113 builtin_vpn_modules =
114 builtin_vpn_sources =
118 sbin_PROGRAMS += vpn/connman-vpnd
120 vpn_connman_vpnd_SOURCES = $(gdbus_sources) $(builtin_vpn_sources) \
121 $(gweb_sources) vpn/vpn.ver vpn/main.c vpn/vpn.h \
122 src/log.c src/error.c src/plugin.c src/task.c \
123 vpn/vpn-manager.c vpn/vpn-provider.c \
124 vpn/vpn-provider.h vpn/vpn-rtnl.h \
125 vpn/vpn-ipconfig.c src/inet.c vpn/vpn-rtnl.c \
126 src/dbus.c src/storage.c src/ipaddress.c src/agent.c \
127 vpn/vpn-agent.c vpn/vpn-agent.h src/inotify.c \
130 vpn_connman_vpnd_LDADD = $(builtin_vpn_libadd) @GLIB_LIBS@ @DBUS_LIBS@ \
131 @GNUTLS_LIBS@ -lresolv -ldl
133 vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
134 -Wl,--version-script=$(srcdir)/vpn/vpn.ver
137 BUILT_SOURCES = $(local_headers) src/builtin.h
140 BUILT_SOURCES += vpn/builtin.h
143 CLEANFILES = src/connman.conf $(BUILT_SOURCES)
145 statedir = $(localstatedir)/run/connman
148 vpn_plugindir = $(libdir)/connman/plugins-vpn
151 plugindir = $(libdir)/connman/plugins
153 scriptdir = $(libdir)/connman/scripts
155 storagedir = $(localstatedir)/lib/connman
156 vpn_storagedir = $(localstatedir)/lib/connman-vpn
158 configdir = ${sysconfdir}/connman
162 build_vpn_plugindir = $(abs_top_srcdir)/vpn/plugins/.libs
164 build_plugindir = $(abs_top_srcdir)/plugins/.libs
165 build_scriptdir = $(abs_top_srcdir)/scripts
167 build_plugindir = $(plugindir)
168 build_scriptdir = $(scriptdir)
170 build_vpn_plugindir = $(vpn_plugindir)
174 AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
175 @GNUTLS_CFLAGS@ $(builtin_cflags) \
176 -DCONNMAN_PLUGIN_BUILTIN \
177 -DSTATEDIR=\""$(statedir)"\" \
178 -DPLUGINDIR=\""$(build_plugindir)"\" \
179 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
180 -DSTORAGEDIR=\""$(storagedir)\"" \
181 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
182 -DCONFIGDIR=\""$(configdir)\""
185 AM_CPPFLAGS = -I$(builddir)/include -I$(srcdir)/gdbus
187 AM_CPPFLAGS = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
190 src_connmand_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
191 @GNUTLS_CFLAGS@ $(builtin_cflags) \
192 -DCONNMAN_PLUGIN_BUILTIN \
193 -DSTATEDIR=\""$(statedir)"\" \
194 -DPLUGINDIR=\""$(build_plugindir)"\" \
195 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
196 -DSTORAGEDIR=\""$(storagedir)\"" \
197 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
198 -DCONFIGDIR=\""$(configdir)\"" \
201 EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf \
202 plugins/connman-nmcompat.conf
205 vpn_connman_vpnd_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ \
206 $(builtin_vpn_cflags) \
207 -DCONNMAN_PLUGIN_BUILTIN \
208 -DSTATEDIR=\""$(statedir)"\" \
209 -DPLUGINDIR=\""$(build_vpn_plugindir)"\" \
210 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
211 -DSTORAGEDIR=\""$(storagedir)\"" \
212 -DVPN_STORAGEDIR=\""$(vpn_storagedir)\"" \
213 -DCONFIGDIR=\""$(configdir)\"" \
218 EXTRA_DIST += vpn/vpn-dbus.conf vpn/vpn-polkit.conf
224 include Makefile.plugins
227 noinst_PROGRAMS += client/connmanctl
229 MANUAL_PAGES += doc/connmanctl.1
231 client_connmanctl_SOURCES = $(gdbus_sources) \
232 client/dbus_helpers.h client/dbus_helpers.c \
233 client/services.h client/services.c \
234 client/commands.h client/commands.c \
235 client/input.h client/input.c \
238 client_connmanctl_LDADD = @DBUS_LIBS@ @GLIB_LIBS@ -lreadline -ldl
241 noinst_PROGRAMS += unit/test-pbkdf2-sha1 unit/test-prf-sha1 unit/test-ippool
243 unit_test_pbkdf2_sha1_SOURCES = unit/test-pbkdf2-sha1.c \
244 src/shared/sha1.h src/shared/sha1.c
245 unit_test_pbkdf2_sha1_LDADD = @GLIB_LIBS@
247 unit_test_prf_sha1_SOURCES = unit/test-prf-sha1.c \
248 src/shared/sha1.h src/shared/sha1.c
249 unit_test_prf_sha1_LDADD = @GLIB_LIBS@
251 unit_test_ippool_SOURCES = $(gdbus_sources) src/log.c src/dbus.c \
252 src/ippool.c unit/test-ippool.c
253 unit_test_ippool_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -ldl
255 TESTS = unit/test-pbkdf2-sha1 unit/test-prf-sha1 unit/test-ippool
258 noinst_PROGRAMS += tools/wispr
260 tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
261 tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
265 noinst_PROGRAMS += tools/supplicant-test \
266 tools/dhcp-test tools/dhcp-server-test \
267 tools/addr-test tools/web-test tools/resolv-test \
268 tools/dbus-test tools/polkit-test \
269 tools/iptables-test tools/tap-test tools/wpad-test \
270 tools/stats-tool tools/private-network-test \
271 tools/session-test tools/iptables-unit \
274 tools_supplicant_test_SOURCES = $(gdbus_sources) tools/supplicant-test.c \
275 tools/supplicant-dbus.h tools/supplicant-dbus.c \
276 tools/supplicant.h tools/supplicant.c
277 tools_supplicant_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
279 tools_web_test_SOURCES = $(gweb_sources) tools/web-test.c
280 tools_web_test_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
282 tools_resolv_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/resolv-test.c
283 tools_resolv_test_LDADD = @GLIB_LIBS@ -lresolv
285 tools_wpad_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/wpad-test.c
286 tools_wpad_test_LDADD = @GLIB_LIBS@ -lresolv
288 tools_stats_tool_LDADD = @GLIB_LIBS@
290 tools_dhcp_test_SOURCES = $(gdhcp_sources) tools/dhcp-test.c
291 tools_dhcp_test_LDADD = @GLIB_LIBS@
293 tools_dhcp_server_test_SOURCES = $(gdhcp_sources) tools/dhcp-server-test.c
294 tools_dhcp_server_test_LDADD = @GLIB_LIBS@
296 tools_dbus_test_SOURCES = $(gdbus_sources) tools/dbus-test.c
297 tools_dbus_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
299 tools_polkit_test_LDADD = @DBUS_LIBS@
301 tools_iptables_test_SOURCES = src/log.c src/iptables.c tools/iptables-test.c
302 tools_iptables_test_LDADD = @GLIB_LIBS@ @XTABLES_LIBS@ -ldl
304 tools_private_network_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
306 tools_session_test_SOURCES = $(gdbus_sources) src/log.c src/dbus.c \
307 tools/session-test.c tools/session-utils.c tools/manager-api.c \
308 tools/session-api.c tools/session-test.h
309 tools_session_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ -ldl
311 tools_iptables_unit_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
312 -DIPTABLES_SAVE=\""${IPTABLES_SAVE}"\"
313 tools_iptables_unit_SOURCES = $(gdbus_sources) src/log.c \
314 src/iptables.c src/firewall.c src/nat.c tools/iptables-unit.c
315 tools_iptables_unit_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ @XTABLES_LIBS@ -ldl
317 tools_dnsproxy_test_SOURCES = tools/dnsproxy-test.c
318 tools_dnsproxy_test_LDADD = @GLIB_LIBS@
322 test_scripts = test/get-state test/list-services \
323 test/monitor-services test/test-clock \
324 test/simple-agent test/show-introspection test/test-compat \
325 test/test-manager test/test-connman test/monitor-connman \
326 test/connect-provider test/remove-provider \
327 test/test-counter test/set-ipv4-method test/set-ipv6-method \
328 test/get-services test/get-proxy-autoconfig test/set-proxy \
329 test/enable-tethering test/disable-tethering test/backtrace \
330 test/test-session test/test-supplicant \
331 test/test-new-supplicant test/service-move-before \
332 test/set-global-timeservers test/get-global-timeservers \
333 test/set-nameservers test/set-domains test/set-timeservers
335 test_scripts += test/vpn-connect test/vpn-disconnect test/vpn-get \
336 test/monitor-vpn test/vpn-property
339 testdir = $(pkglibdir)/test
340 test_SCRIPTS = $(test_scripts)
343 EXTRA_DIST += $(test_scripts)
345 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
346 doc/ipconfig-api.txt doc/plugin-api.txt \
347 doc/manager-api.txt doc/agent-api.txt \
348 doc/service-api.txt doc/technology-api.txt \
349 doc/counter-api.txt doc/config-format.txt \
350 doc/clock-api.txt doc/session-api.txt \
351 doc/session-overview.txt doc/backtrace.txt \
352 doc/advanced-configuration.txt \
353 doc/vpn-connection-api.txt \
354 doc/vpn-manager-api.txt doc/vpn-overview.txt
356 EXTRA_DIST += src/main.conf
358 MANUAL_PAGES += doc/connman.8 doc/connman.conf.5
360 noinst_dist_man_MANS = $(MANUAL_PAGES)
362 pkgconfigdir = $(libdir)/pkgconfig
364 pkgconfig_DATA = connman.pc
366 DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \
367 --disable-datafiles \
368 --enable-hh2serial-gps \
369 --enable-openconnect \
372 --enable-session-policy-local \
376 DISTCLEANFILES = $(pkgconfig_DATA)
378 MAINTAINERCLEANFILES = Makefile.in \
379 aclocal.m4 configure config.h.in config.sub config.guess \
380 ltmain.sh depcomp compile missing install-sh mkinstalldirs
383 src/builtin.h: src/genbuiltin $(builtin_sources)
384 $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
386 vpn/builtin.h: src/genbuiltin $(builtin_vpn_sources)
387 $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_vpn_modules) > $@
389 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
391 $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
393 $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
397 vpn/connman-vpn-dbus.conf: vpn/vpn-dbus.conf vpn/vpn-polkit.conf
399 $(AM_V_GEN)cp $(srcdir)/vpn/vpn-polkit.conf $@
401 $(AM_V_GEN)cp $(srcdir)/vpn/vpn-dbus.conf $@
407 EXTRA_DIST += connman-task.pp
408 CLEANFILES += connman-task.pp
411 connman-task.pp: vpn/connman-task.te
412 make -f /usr/share/selinux/devel/Makefile
415 EXTRA_DIST += vpn/connman-task.te
417 include/connman/version.h: include/version.h
418 $(AM_V_at)$(MKDIR_P) include/connman
419 $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
421 include/connman/%.h: $(abs_top_srcdir)/include/%.h
422 $(AM_V_at)$(MKDIR_P) include/connman
423 $(AM_V_GEN)$(LN_S) $< $@
426 @$(RM) -rf include/connman