2 AM_MAKEFLAGS = --no-print-directory
4 includedir = @includedir@/connman
6 include_HEADERS = include/types.h include/log.h include/plugin.h \
7 include/security.h include/notifier.h \
8 include/storage.h include/service.h \
9 include/resolver.h include/ipconfig.h \
10 include/device.h include/network.h include/inet.h
12 nodist_include_HEADERS = include/version.h
14 noinst_HEADERS = include/driver.h include/element.h include/property.h \
15 include/rtnl.h include/wifi.h include/task.h \
16 include/dbus.h include/rfkill.h include/option.h \
17 include/profile.h include/provider.h include/dhcp.h \
18 include/utsname.h include/timeserver.h \
19 include/location.h include/technology.h
21 local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS) \
22 $(noinst_HEADERS), include/connman/$(notdir $(file)))
25 gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/object.c gdbus/watch.c
27 gdhcp_sources = gdhcp/gdhcp.h gdhcp/common.h gdhcp/common.c gdhcp/client.c
30 dbusdir = @DBUS_DATADIR@
32 dbus_DATA = src/connman.conf
46 sbin_PROGRAMS = src/connmand
48 src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) $(builtin_sources) \
49 src/main.c src/connman.h src/log.c src/selftest.c \
50 src/error.c src/plugin.c src/task.c src/element.c \
51 src/device.c src/network.c src/connection.c \
52 src/manager.c src/profile.c src/service.c \
53 src/agent.c src/notifier.c src/provider.c \
54 src/security.c src/resolver.c src/ipconfig.c \
55 src/ipv4.c src/dhcp.c src/rtnl.c src/inet.c \
56 src/utsname.c src/timeserver.c src/rfkill.c \
57 src/wifi.c src/storage.c src/dbus.c src/config.c \
58 src/technology.c src/counter.c src/location.c \
59 src/session.c src/tethering.c
62 src_connmand_SOURCES += src/udev.c
64 src_connmand_SOURCES += src/udev-compat.c
67 src_connmand_LDADD = $(builtin_libadd) \
68 @GLIB_LIBS@ @DBUS_LIBS@ @CAPNG_LIBS@ @UDEV_LIBS@ -ldl
70 src_connmand_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=src/connman.ver
72 src_connmand_DEPENDENCIES = src/connman.ver
74 CLEANFILES = src/connman.ver src/connman.exp src/connman.conf \
75 src/builtin.h $(local_headers)
77 statedir = $(localstatedir)/run/connman
79 plugindir = $(libdir)/connman/plugins
81 scriptdir = $(libdir)/connman/scripts
83 storagedir = $(localstatedir)/lib/connman
86 build_plugindir = $(abs_top_srcdir)/plugins/.libs
87 build_scriptdir = $(abs_top_srcdir)/scripts
89 build_plugindir = $(plugindir)
90 build_scriptdir = $(scriptdir)
93 AM_CFLAGS = @UDEV_CFLAGS@ @IPTC_CFLAGS@ @NETLINK_CFLAGS@ @CAPNG_CFLAGS@ \
94 @DBUS_CFLAGS@ @GLIB_CFLAGS@ $(builtin_cflags) \
95 -DCONNMAN_PLUGIN_BUILTIN \
96 -DSTATEDIR=\""$(statedir)"\" \
97 -DPLUGINDIR=\""$(build_plugindir)"\" \
98 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
99 -DSTORAGEDIR=\""$(storagedir)\""
101 INCLUDES = -I$(builddir)/include -I$(builddir)/src \
102 -I$(srcdir)/gdbus -I$(srcdir)/gdhcp
104 EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf
111 include Makefile.plugins
114 noinst_PROGRAMS += client/cm
116 client_cm_SOURCES = client/main.c
117 client_cm_LDADD = @DBUS_LIBS@
121 noinst_PROGRAMS += tools/wifi-scan tools/supplicant-test tools/dhcp-test \
122 tools/addr-test tools/tap-test tools/resolv-test \
123 tools/dbus-test tools/polkit-test tools/portal-test \
126 tools_wifi_scan_LDADD = @GLIB_LIBS@ @NETLINK_LIBS@
128 tools_supplicant_test_SOURCES = $(gdbus_sources) tools/supplicant-test.c \
129 tools/supplicant-dbus.h tools/supplicant-dbus.c \
130 tools/supplicant.h tools/supplicant.c
131 tools_supplicant_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
133 tools_dhcp_test_SOURCES = $(gdhcp_sources) tools/dhcp-test.c
134 tools_dhcp_test_LDADD = @GLIB_LIBS@
136 tools_dbus_test_SOURCES = $(gdbus_sources) tools/dbus-test.c
137 tools_dbus_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
139 tools_resolv_test_LDADD = -lresolv
141 tools_polkit_test_LDADD = @DBUS_LIBS@
143 tools_portal_test_LDADD = @GLIB_LIBS@
145 tools_iptables_test_LDADD = @IPTC_LIBS@ -lip4tc -lxtables
148 test_scripts = test/get-state test/list-profiles test/list-services \
149 test/connect-service test/monitor-services \
150 test/list-devices test/enable-device test/disable-device \
151 test/start-scanning test/list-networks \
152 test/set-passphrase test/set-address test/test-profile \
153 test/simple-agent test/show-introspection test/test-compat \
154 test/test-manager test/test-connman test/monitor-connman \
155 test/connect-vpn test/disconnect-vpn test/list-providers \
156 test/monitor-manager test/test-counter test/set-ip-method \
157 test/set-nameservers test/set-domains test/find-service \
159 test/enable-tethering test/disable-tethering
162 testdir = $(pkglibdir)/test
163 test_SCRIPTS = $(test_scripts)
166 EXTRA_DIST += $(test_scripts)
168 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
169 doc/ipconfig-api.txt doc/plugin-api.txt \
170 doc/manager-api.txt doc/agent-api.txt \
171 doc/profile-api.txt doc/service-api.txt \
172 doc/technology-api.txt doc/counter-api.txt \
173 doc/device-lowlevel-api.txt \
174 doc/network-lowlevel-api.txt \
175 doc/advanced-configuration.txt \
176 doc/config-format.txt
178 pkgconfigdir = $(libdir)/pkgconfig
180 pkgconfig_DATA = connman.pc
182 DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \
183 --disable-datafiles \
191 --enable-resolvconf \
198 --enable-hh2serial-gps \
202 DISTCLEANFILES = $(pkgconfig_DATA)
204 MAINTAINERCLEANFILES = Makefile.in \
205 aclocal.m4 configure config.h.in config.sub config.guess \
206 ltmain.sh depcomp compile missing install-sh mkinstalldirs
209 src/plugin.$(OBJEXT): src/builtin.h
211 src/builtin.h: src/genbuiltin $(builtin_sources)
212 $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
214 src/connman.exp: $(src_connmand_OBJECTS)
215 $(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
216 $(EGREP) -e '^connman_' -e '^g_dbus_' > $@
218 src/connman.ver: src/connman.exp
219 $(AM_V_at)echo "{ global:" > $@
220 $(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
221 $(AM_V_at)echo "local: *; };" >> $@
223 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
225 $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
227 $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
230 $(src_connmand_OBJECTS) $(plugin_objects): $(local_headers)
232 include/connman/version.h: include/version.h
233 $(AM_V_at)$(MKDIR_P) include/connman
234 $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
236 include/connman/%.h: include/%.h
237 $(AM_V_at)$(MKDIR_P) include/connman
238 $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
241 @$(RM) -rf include/connman