6to4: Add 6to4 tunnel support.
[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
12 nodist_include_HEADERS = include/version.h
13
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 \
18                         include/utsname.h include/timeserver.h include/proxy.h \
19                         include/location.h include/technology.h
20
21 local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS) \
22                         $(noinst_HEADERS), include/connman/$(notdir $(file)))
23
24
25 gdbus_sources = gdbus/gdbus.h gdbus/mainloop.c gdbus/watch.c \
26                                         gdbus/object.c gdbus/polkit.c
27
28 gdhcp_sources = gdhcp/gdhcp.h gdhcp/common.h gdhcp/common.c gdhcp/client.c \
29                 gdhcp/server.c gdhcp/ipv4ll.h gdhcp/ipv4ll.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 if DATAFILES
35
36 if NMCOMPAT
37 nmcompat_conf = plugins/connman-nmcompat.conf
38 endif
39
40 dbusconfdir = @DBUS_CONFDIR@
41
42 dbusconf_DATA = src/connman.conf $(nmcompat_conf)
43
44 if SYSTEMD
45 systemdunitdir = @SYSTEMD_UNITDIR@
46
47 systemdunit_DATA = src/connman.service
48 endif
49 endif
50
51 plugin_LTLIBRARIES =
52
53 plugin_objects =
54
55 builtin_modules =
56 builtin_sources =
57 builtin_libadd =
58 builtin_cflags =
59
60 noinst_PROGRAMS =
61
62 sbin_PROGRAMS = src/connmand
63
64 src_connmand_SOURCES = $(gdbus_sources) $(gdhcp_sources) \
65                         gweb/gweb.h gweb/gweb.c \
66                         gweb/gresolv.h gweb/gresolv.c \
67                         gweb/giognutls.h gweb/gionotls.c \
68                         $(builtin_sources) src/connman.ver \
69                         src/main.c src/connman.h src/log.c \
70                         src/error.c src/plugin.c src/task.c src/element.c \
71                         src/device.c src/network.c src/connection.c \
72                         src/manager.c src/profile.c src/service.c \
73                         src/agent.c src/notifier.c src/provider.c \
74                         src/resolver.c src/ipconfig.c src/detect.c src/inet.c \
75                         src/dhcp.c src/rtnl.c src/proxy.c \
76                         src/utsname.c src/timeserver.c src/rfkill.c \
77                         src/wifi.c src/storage.c src/dbus.c src/config.c \
78                         src/technology.c src/counter.c src/location.c \
79                         src/session.c src/tethering.c src/wpad.c src/wispr.c \
80                         src/stats.c src/iptables.c src/dnsproxy.c src/6to4.c
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                 plugins/connman-nmcompat.conf
119
120
121 script_DATA =
122 script_PROGRAMS =
123 script_LTLIBRARIES =
124
125 include Makefile.plugins
126
127 if CLIENT
128 noinst_PROGRAMS += client/cm
129
130 client_cm_SOURCES = client/main.c
131 client_cm_LDADD = @DBUS_LIBS@
132 endif
133
134 if TOOLS
135 noinst_PROGRAMS += tools/wispr tools/wifi-scan tools/supplicant-test \
136                         tools/dhcp-test tools/dhcp-server-test \
137                         tools/addr-test tools/web-test tools/resolv-test \
138                         tools/dbus-test tools/polkit-test \
139                         tools/iptables-test tools/tap-test tools/wpad-test \
140                         tools/stats-tool
141
142 tools_wispr_SOURCES = $(gweb_sources) tools/wispr.c
143 tools_wispr_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
144
145 tools_wifi_scan_LDADD = @GLIB_LIBS@ @NETLINK_LIBS@
146
147 tools_supplicant_test_SOURCES = $(gdbus_sources) tools/supplicant-test.c \
148                         tools/supplicant-dbus.h tools/supplicant-dbus.c \
149                         tools/supplicant.h tools/supplicant.c
150 tools_supplicant_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
151
152 tools_web_test_SOURCES = $(gweb_sources) tools/web-test.c
153 tools_web_test_LDADD = @GLIB_LIBS@ @GNUTLS_LIBS@ -lresolv
154
155 tools_resolv_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/resolv-test.c
156 tools_resolv_test_LDADD = @GLIB_LIBS@ -lresolv
157
158 tools_wpad_test_SOURCES = gweb/gresolv.h gweb/gresolv.c tools/wpad-test.c
159 tools_wpad_test_LDADD = @GLIB_LIBS@ -lresolv
160
161 tools_stats_tool_LDADD = @GLIB_LIBS@
162
163 tools_dhcp_test_SOURCES = $(gdhcp_sources) tools/dhcp-test.c
164 tools_dhcp_test_LDADD = @GLIB_LIBS@
165
166 tools_dhcp_server_test_SOURCES = $(gdhcp_sources) tools/dhcp-server-test.c
167 tools_dhcp_server_test_LDADD = @GLIB_LIBS@
168
169 tools_dbus_test_SOURCES = $(gdbus_sources) tools/dbus-test.c
170 tools_dbus_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
171
172 tools_polkit_test_LDADD = @DBUS_LIBS@
173
174 tools_iptables_test_LDADD = @GLIB_LIBS@ @XTABLES_LIBS@
175 endif
176
177 test_scripts = test/get-state test/list-profiles test/list-services \
178                 test/connect-service test/monitor-services \
179                 test/set-address test/test-profile \
180                 test/simple-agent test/show-introspection test/test-compat \
181                 test/test-manager test/test-connman test/monitor-connman \
182                 test/connect-vpn test/disconnect-vpn test/monitor-manager \
183                 test/test-counter test/set-ipv4-method test/set-ipv6-method \
184                 test/set-nameservers test/set-domains test/find-service \
185                 test/get-services test/get-proxy-autoconfig test/set-proxy \
186                 test/enable-tethering test/disable-tethering test/backtrace
187
188 if TEST
189 testdir = $(pkglibdir)/test
190 test_SCRIPTS = $(test_scripts)
191 endif
192
193 EXTRA_DIST += $(test_scripts)
194
195 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
196                                 doc/ipconfig-api.txt doc/plugin-api.txt \
197                                 doc/manager-api.txt doc/agent-api.txt \
198                                 doc/profile-api.txt doc/service-api.txt \
199                                 doc/technology-api.txt doc/counter-api.txt \
200                                 doc/advanced-configuration.txt \
201                                 doc/config-format.txt
202
203 pkgconfigdir = $(libdir)/pkgconfig
204
205 pkgconfig_DATA = connman.pc
206
207 DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \
208                                 --disable-datafiles \
209                                 --enable-loopback \
210                                 --enable-ethernet \
211                                 --enable-wifi \
212                                 --enable-bluetooth \
213                                 --enable-ofono \
214                                 --enable-pacrunner \
215                                 --enable-google \
216                                 --enable-meego \
217                                 --enable-client \
218                                 --enable-portal \
219                                 --enable-hh2serial-gps \
220                                 --enable-ntpd \
221                                 --enable-openconnect \
222                                 --enable-tools
223
224 DISTCLEANFILES = $(pkgconfig_DATA)
225
226 MAINTAINERCLEANFILES = Makefile.in \
227         aclocal.m4 configure config.h.in config.sub config.guess \
228         ltmain.sh depcomp compile missing install-sh mkinstalldirs
229
230
231 src/plugin.$(OBJEXT): src/builtin.h
232
233 src/builtin.h: src/genbuiltin $(builtin_sources)
234         $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
235
236 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
237 if POLKIT
238         $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
239 else
240         $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
241 endif
242
243 $(src_connmand_OBJECTS) $(plugin_objects): $(local_headers)
244
245 include/connman/version.h: include/version.h
246         $(AM_V_at)$(MKDIR_P) include/connman
247         $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
248
249 include/connman/%.h: include/%.h
250         $(AM_V_at)$(MKDIR_P) include/connman
251         $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
252
253 clean-local:
254         @$(RM) -rf include/connman