Add code for retrieving supplicant global properties
[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/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
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 include/dhcp.h \
18                         include/utsname.h include/timeserver.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/object.c gdbus/watch.c
25
26 if DATAFILES
27 dbusdir = @DBUS_DATADIR@
28
29 dbus_DATA = src/connman.conf
30 endif
31
32 plugin_LTLIBRARIES =
33
34 plugin_objects =
35
36 builtin_modules =
37 builtin_sources =
38 builtin_libadd =
39 builtin_cflags =
40
41 noinst_PROGRAMS =
42
43 sbin_PROGRAMS = src/connmand
44
45 src_connmand_SOURCES = $(gdbus_sources) $(builtin_sources) \
46                         src/main.c src/connman.h src/log.c src/selftest.c \
47                         src/error.c src/plugin.c src/task.c src/element.c \
48                         src/device.c src/network.c src/connection.c \
49                         src/manager.c src/profile.c src/service.c \
50                         src/agent.c src/notifier.c src/provider.c \
51                         src/security.c src/resolver.c src/ipconfig.c \
52                         src/ipv4.c src/dhcp.c src/rtnl.c src/inet.c \
53                         src/utsname.c src/timeserver.c src/rfkill.c \
54                         src/wifi.c src/storage.c src/dbus.c src/config.c
55
56 if UDEV
57 src_connmand_SOURCES += src/udev.c
58 else
59 src_connmand_SOURCES += src/udev-compat.c
60 endif
61
62 src_connmand_LDADD = $(builtin_libadd) \
63                         @GLIB_LIBS@ @DBUS_LIBS@ @CAPNG_LIBS@ @UDEV_LIBS@ -ldl
64
65 src_connmand_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=src/connman.ver
66
67 src_connmand_DEPENDENCIES = src/connman.ver
68
69 CLEANFILES = src/connman.ver src/connman.exp src/connman.conf \
70                                                 src/builtin.h $(local_headers)
71
72 statedir = $(localstatedir)/run/connman
73
74 plugindir = $(libdir)/connman/plugins
75
76 scriptdir = $(libdir)/connman/scripts
77
78 storagedir = $(localstatedir)/lib/connman
79
80 if MAINTAINER_MODE
81 build_plugindir = $(abs_top_srcdir)/plugins/.libs
82 build_scriptdir = $(abs_top_srcdir)/scripts
83 else
84 build_plugindir = $(plugindir)
85 build_scriptdir = $(scriptdir)
86 endif
87
88 AM_CFLAGS = @UDEV_CFLAGS@ @NETLINK_CFLAGS@ @CAPNG_CFLAGS@ \
89                         @DBUS_CFLAGS@ @GLIB_CFLAGS@ $(builtin_cflags) \
90                                 -DCONNMAN_PLUGIN_BUILTIN \
91                                 -DSTATEDIR=\""$(statedir)"\" \
92                                 -DPLUGINDIR=\""$(build_plugindir)"\" \
93                                 -DSCRIPTDIR=\""$(build_scriptdir)"\" \
94                                 -DSTORAGEDIR=\""$(storagedir)\""
95
96 INCLUDES = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
97
98 EXTRA_DIST = src/genbuiltin src/connman-dbus.conf src/connman-polkit.conf
99
100
101 script_DATA =
102 script_PROGRAMS =
103 script_LTLIBRARIES =
104
105 include Makefile.plugins
106
107 if CLIENT
108 noinst_PROGRAMS += client/cm
109
110 client_cm_SOURCES = client/main.c
111 client_cm_LDADD = @DBUS_LIBS@
112 endif
113
114 if TOOLS
115 noinst_PROGRAMS += tools/wifi-scan tools/supplicant-test \
116                         tools/addr-test tools/tap-test tools/polkit-test
117
118 tools_wifi_scan_LDADD = @GLIB_LIBS@ @NETLINK_LIBS@
119
120 tools_supplicant_test_SOURCES = $(gdbus_sources) tools/supplicant-test.c \
121                                         tools/supplicant.h tools/supplicant.c
122 tools_supplicant_test_LDADD = @GLIB_LIBS@ @DBUS_LIBS@
123
124 tools_polkit_test_LDADD = @DBUS_LIBS@
125 endif
126
127 test_scripts = test/get-state test/list-profiles test/list-services \
128                 test/connect-service test/monitor-services \
129                 test/list-devices test/enable-device test/disable-device \
130                 test/start-scanning test/list-networks \
131                 test/set-passphrase test/set-address test/test-profile \
132                 test/simple-agent test/show-introspection test/test-compat \
133                 test/test-manager test/test-connman test/monitor-connman \
134                 test/connect-vpn test/disconnect-vpn test/list-providers
135
136 if TEST
137 testdir = $(pkglibdir)/test
138 test_SCRIPTS = $(test_scripts)
139 endif
140
141 EXTRA_DIST += $(test_scripts)
142
143 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
144                                 doc/ipconfig-api.txt doc/plugin-api.txt \
145                                 doc/manager-api.txt doc/agent-api.txt \
146                                 doc/profile-api.txt doc/service-api.txt \
147                                 doc/device-lowlevel-api.txt \
148                                 doc/network-lowlevel-api.txt \
149                                 advanced-configuration.txt
150
151 pkgconfigdir = $(libdir)/pkgconfig
152
153 pkgconfig_DATA = connman.pc
154
155 DISTCHECK_CONFIGURE_FLAGS = --disable-gtk-doc \
156                                 --disable-datafiles \
157                                 --enable-loopback \
158                                 --enable-ethernet \
159                                 --enable-wifi \
160                                 --enable-bluetooth \
161                                 --enable-ofono \
162                                 --enable-udhcp \
163                                 --enable-dhclient \
164                                 --enable-resolvconf \
165                                 --enable-dnsproxy \
166                                 --enable-google \
167                                 --enable-moblin \
168                                 --enable-hso \
169                                 --enable-mbm \
170                                 --enable-udev \
171                                 --enable-client \
172                                 --enable-tools
173
174 DISTCLEANFILES = $(pkgconfig_DATA)
175
176 MAINTAINERCLEANFILES = Makefile.in \
177         aclocal.m4 configure config.h.in config.sub config.guess \
178         ltmain.sh depcomp compile missing install-sh mkinstalldirs
179
180
181 src/plugin.$(OBJEXT): src/builtin.h
182
183 src/builtin.h: src/genbuiltin $(builtin_sources)
184         $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
185
186 src/connman.exp: $(src_connmand_OBJECTS)
187         $(AM_V_GEN)$(NM) $^ | $(AWK) '{ print $$3 }' | sort -u | \
188                                 $(EGREP) -e '^connman_' -e '^g_dbus_' > $@
189
190 src/connman.ver: src/connman.exp
191         $(AM_V_at)echo "{ global:" > $@
192         $(AM_V_GEN)$(SED) -e "s/\(.*\)/\1;/" $< >> $@
193         $(AM_V_at)echo "local: *; };" >> $@
194
195 src/connman.conf: src/connman-dbus.conf src/connman-polkit.conf
196 if POLKIT
197         $(AM_V_GEN)cp $(srcdir)/src/connman-polkit.conf $@
198 else
199         $(AM_V_GEN)cp $(srcdir)/src/connman-dbus.conf $@
200 endif
201
202 $(src_connmand_OBJECTS) $(plugin_objects): $(local_headers)
203
204 include/connman/version.h: include/version.h
205         $(AM_V_at)$(MKDIR_P) include/connman
206         $(AM_V_GEN)$(LN_S) $(abs_top_builddir)/$< $@
207
208 include/connman/%.h: include/%.h
209         $(AM_V_at)$(MKDIR_P) include/connman
210         $(AM_V_GEN)$(LN_S) $(abs_top_srcdir)/$< $@
211
212 clean-local: include/connman
213         @$(RM) -r $<