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