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