afa1ce91fd8a02ae6053e564f8d564b881c08971
[platform/upstream/connman.git] / src / Makefile.am
1
2 dbusdir = $(sysconfdir)/dbus-1/system.d
3
4 dbus_DATA = connman.conf
5
6 servicedir = $(datarootdir)/dbus-1/system-services
7
8 service_DATA = connman.service
9
10 DISTCLEANFILES = $(service_DATA)
11
12 sbin_PROGRAMS = connmand
13
14 connmand_SOURCES = main.c connman.h log.c error.c plugin.c profile.c \
15                                 element.c device.c security.c storage.c \
16                                                 manager.c agent.c rtnl.c
17
18 connmand_LDADD = @GDBUS_LIBS@ @GLIB_LIBS@ @GTHREAD_LIBS@ -ldl
19
20 connmand_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=connman.ver
21
22 connmand_DEPENDENCIES = connman.ver
23
24 CLEANFILES = connman.ver connman.exp
25
26 statedir = $(localstatedir)/run/connman
27
28 storagedir = $(localstatedir)/lib/connman
29
30 if MAINTAINER_MODE
31 plugindir = $(abs_top_srcdir)/plugins/.libs
32 else
33 plugindir = $(libdir)/connman/plugins
34 endif
35
36 AM_CFLAGS = @GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ \
37                         -DSTATEDIR=\""$(statedir)"\" \
38                         -DSTORAGEDIR=\""$(storagedir)\"" \
39                         -DPLUGINDIR=\""$(plugindir)"\"
40
41 INCLUDES = -I$(top_builddir)/include
42
43 EXTRA_DIST = $(dbus_DATA)
44
45 MAINTAINERCLEANFILES = Makefile.in
46
47 connman.exp:
48         nm -B *.o | awk '{ print $$3 }' | sort -u | grep -E -e '^connman_' > $@
49
50 connman.ver: connman.exp
51         echo "{ global:" > $@
52         cat $< | sed -e "s/\(.*\)/\1;/" >> $@
53         echo "local: *; };" >> $@