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