Add parsing of initial WISPr response
[platform/upstream/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 \
8                         include/storage.h include/service.h \
9                         include/resolver.h include/ipconfig.h \
10                         include/device.h include/network.h include/inet.h \
11                         include/ondemand.h
12
13 nodist_include_HEADERS = include/version.h
14
15 noinst_HEADERS = include/driver.h include/element.h include/property.h \
16                         include/rtnl.h include/wifi.h include/task.h \
17                         include/dbus.h include/rfkill.h include/option.h \
18                         include/profile.h include/provider.h include/dhcp.h \
19                         include/utsname.h include/timeserver.h \
20                         include/location.h include/technology.h
21
22 local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS) \
23                         $(noinst_HEADERS), include/connman/$(notdir $(file)))
24
25
26 gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
27                                         gdbus/object.c gdbus/polkit.c
28
29 gdhcp_sources = gdhcp/gdhcp.h gdhcp/common.h gdhcp/common.c gdhcp/client.c
30
31 gweb_sources = gweb/gweb.h gweb/gweb.c gweb/gresolv.h gweb/gresolv.c \
32                                         gweb/giognutls.h gweb/giognutls.c
33
34 gsupplicant_sources = gsupplicant/gsupplicant.h gsupplicant/dbus.h \
35                         gsupplicant/supplicant.c gsupplicant/dbus.c
36
37 if DATAFILES
38 dbusconfdir = @DBUS_CONFDIR@
39
40 dbusconf_DATA = src/connman.conf
41
42 if SYSTEMD
43 systemdunitdir = @SYSTEMD_UNITDIR@
44
45 systemdunit_DATA = src/connman.service
46 endif
47 endif
48
49 plugin_LTLIBRARIES =
50
51 plugin_objects =
52
53 builtin_modules =
54 builtin_sources =
55 builtin_libadd =
56 builtin_cflags =
57
58 noinst_PROGRAMS =
59
60 sbin_PROGRAMS = src/connmand
61
62 src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) \
63                         gweb/gresolv.h gweb/gresolv.c \
64                         $(builtin_sources) src/connman.ver \
65                         src/main.c src/connman.h src/log.c src/selftest.c \
66                         src/error.c src/plugin.c src/task.c src/element.c \
67                         src/device.c src/network.c src/connection.c \
68                         src/manager.c src/profile.c src/service.c \
69                         src/agent.c src/notifier.c src/provider.c \
70                         src/resolver.c src/ipconfig.c src/detect.c \
71                         src/ipv4.c src/dhcp.c src/rtnl.c src/inet.c \
72                         src/utsname.c src/timeserver.c src/rfkill.c \
73                         src/wifi.c src/storage.c src/dbus.c src/config.c \
74                         src/technology.c src/counter.c src/location.c \
75                         src/session.c src/tethering.c src/ondemand.c \
76                         src/wpad.c src/stats.c src/iptables.c
77
78 if WIFI
79 src_connmand_SOURCES += $(gsupplicant_sources)
80 endif
81
82 src_connmand_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ \
83                                 @CAPNG_LIBS@ @XTABLES_LIBS@ -lresolv -ldl
84
85 src_connmand_LDFLAGS = -Wl,--export-dynamic \
86                                 -Wl,--version-script=$(srcdir)/src/connman.ver
87
88 CLEANFILES = src/connman.conf src/builtin.h $(local_headers)
89
90 statedir = $(localstatedir)/run/connman
91
92 plugindir = $(libdir)/connman/plugins
93
94 scriptdir = $(libdir)/connman/scripts
95
96 storagedir = $(localstatedir)/lib/connman
97
98 if MAINTAINER_MODE
99 build_plugindir = $(abs_top_srcdir)/plugins/.libs
100 build_scriptdir = $(abs_top_srcdir)/scripts
101 else
102 build_plugindir = $(plugindir)
103 build_scriptdir = $(scriptdir)
104 endif
105
106 AM_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @CAPNG_CFLAGS@ @XTABLES_CFLAGS@ \
107                                 @NETLINK_CFLAGS@ @GNUTLS_CFLAGS@ \
108                                 $(builtin_cflags) \
109                                 -DCONNMAN_PLUGIN_BUILTIN \
110                                 -DSTATEDIR=\""$(statedir)"\" \
111                                 -DPLUGINDIR=\""$(build_plugindir)"\" \
112                                 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
113                                 -DSTORAGEDIR=\""$(storagedir)\""
114
115 INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
116
117 EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf
118
119
120 script_DATA =
121 script_PROGRAMS =
122 script_LTLIBRARIES =
123
124 include Makefile.plugins
125
126 if CLIENT
127 noinst_PROGRAMS += client/cm
128
129 client_cm_SOURCES = client/main.c
130 client_cm_LDADD = @DBUS_LIBS@
131 endif
132
133 if TOOLS
134 noinst_PROGRAMS += tools/wispr tools/wifi-scan \
135                         tools/supplicant-test tools/dhcp-test \
136                         tools/addr-test tools/web-test tools/resolv-test \
137                         tools/dbus-test tools/polkit-test tools/portal-test \
138                         tools/iptables-test tools/tap-test tools/wpad-test \
139                         tools/stats-ringbuffer-dump
140
141 tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
142 tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
143
144 tools_wifi_scan_LDADD = @GLIB_LIBS@ @NETLINK_LIBS@
145
146 tools_supplicant_test_SOURCES = $(gdbus_sources) tools/supplicant-test.c \
147                         tools/supplicant-dbus.h tools/supplicant-dbus.c \
148                         tools/supplicant.h tools/supplicant.c
149 tools_supplicant_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
150
151 tools_web_test_SOURCES = $(gweb_sources) tools/web-test.c
152 tools_web_test_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
153
154 tools_resolv_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/resolv-test.c
155 tools_resolv_test_LDADD = @GLIB_LIBS@ -lresolv
156
157 tools_wpad_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/wpad-test.c
158 tools_wpad_test_LDADD = @GLIB_LIBS@ -lresolv
159
160 tools_dhcp_test_SOURCES = $(gdhcp_sources) tools/dhcp-test.c
161 tools_dhcp_test_LDADD = @GLIB_LIBS@
162
163 tools_dbus_test_SOURCES = $(gdbus_sources) tools/dbus-test.c
164 tools_dbus_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
165
166 tools_polkit_test_LDADD = @DBUS_LIBS@
167
168 tools_portal_test_LDADD = @GLIB_LIBS@
169
170 tools_iptables_test_LDADD = @GLIB_LIBS@ @XTABLES_LIBS@
171
172 if DHCLIENT
173 noinst_PROGRAMS += tools/dhclient-test
174
175 tools_dhclient_test_SOURCES = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
176                                                         tools/dhclient-test.c
177 tools_dhclient_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
178
179 tools_dhclient_test_CFLAGS = $(AM_CFLAGS) -DDHCLIENT=\"@DHCLIENT@\"
180 endif
181 endif
182
183 test_scripts = test/get-state test/list-profiles test/list-services \
184                 test/connect-service test/monitor-services \
185                 test/list-devices test/enable-device test/disable-device \
186                 test/start-scanning test/list-networks \
187                 test/set-passphrase test/set-address test/test-profile \
188                 test/simple-agent test/show-introspection test/test-compat \
189                 test/test-manager test/test-connman test/monitor-connman \
190                 test/connect-vpn test/disconnect-vpn test/list-providers \
191                 test/monitor-manager test/test-counter test/set-ip-method \
192                 test/set-nameservers test/set-domains test/find-service \
193                 test/get-services test/get-proxy-autoconfig test/set-proxy \
194                 test/enable-tethering test/disable-tethering test/backtrace
195
196 if TEST
197 testdir = $(pkglibdir)/test
198 test_SCRIPTS = $(test_scripts)
199 endif
200
201 EXTRA_DIST += $(test_scripts)
202
203 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
204                                 doc/ipconfig-api.txt doc/plugin-api.txt \
205                                 doc/manager-api.txt doc/agent-api.txt \
206                                 doc/profile-api.txt doc/service-api.txt \
207                                 doc/technology-api.txt doc/counter-api.txt \
208                                 doc/device-lowlevel-api.txt \
209                                 doc/network-lowlevel-api.txt \
210                                 doc/advanced-configuration.txt \
211                                 doc/config-format.txt
212
213 pkgconfigdir = $(libdir)/pkgconfig
214
215 pkgconfig_DATA = connman.pc
216
217 DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \
218                                 --disable-datafiles \
219                                 --enable-loopback \
220                                 --enable-ethernet \
221                                 --enable-wifi \
222                                 --enable-bluetooth \
223                                 --enable-ofono \
224                                 --enable-dhclient \
225                                 --enable-dnsproxy \
226                                 --enable-pacrunner \
227                                 --enable-google \
228                                 --enable-meego \
229                                 --enable-client \
230                                 --enable-portal \
231                                 --enable-hh2serial-gps \
232                                 --enable-ntpd \
233                                 --enable-openconnect \
234                                 --enable-tools
235
236 DISTCLEANFILES = $(pkgconfig_DATA)
237
238 MAINTAINERCLEANFILES = Makefile.in \
239         aclocal.m4 configure config.h.in config.sub config.guess \
240         ltmain.sh depcomp compile missing install-sh mkinstalldirs
241
242
243 src/plugin.$(OBJEXT): src/builtin.h
244
245 src/builtin.h: src/genbuiltin $(builtin_sources)
246         $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
247
248 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
249 if POLKIT
250         $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
251 else
252         $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
253 endif
254
255 $(src_connmand_OBJECTS) $(plugin_objects): $(local_headers)
256
257 include/connman/version.h: include/version.h
258         $(AM_V_at)$(MKDIR_P) include/connman
259         $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
260
261 include/connman/%.h: include/%.h
262         $(AM_V_at)$(MKDIR_P) include/connman
263         $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
264
265 clean-local:
266         @$(RM) -rf include/connman