Disconnect service on removal if still connected
[connman] / src / Makefile.am
1
2 if DATAFILES
3 dbusdir = @DBUS_DATADIR@
4
5 dbus_DATA = connman.conf
6 endif
7
8 sbin_PROGRAMS = connmand
9
10 connmand_SOURCES = main.c connman.h log.c selftest.c error.c plugin.c \
11                         element.c device.c network.c connection.c \
12                         manager.c profile.c service.c agent.c \
13                         security.c resolver.c ipconfig.c notifier.c \
14                         storage.c ipv4.c detect.c rtnl.c dbus.c
15
16 if UDEV
17 connmand_SOURCES += udev.c
18
19 if DATAFILES
20 rulesdir = @UDEV_DATADIR@
21
22 rules_DATA = 92-connman.rules
23 endif
24 endif
25
26 connmand_LDADD = $(top_builddir)/plugins/libbuiltin.la \
27                 @GDBUS_LIBS@ @GLIB_LIBS@ @GTHREAD_LIBS@ @UDEV_LIBS@ -ldl
28
29 connmand_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=connman.ver
30
31 connmand_DEPENDENCIES = connman.ver
32
33 CLEANFILES = connman.ver connman.exp connman.conf 92-connman.rules
34
35 statedir = $(localstatedir)/run/connman
36
37 storagedir = $(localstatedir)/lib/connman
38
39 if MAINTAINER_MODE
40 plugindir = $(abs_top_srcdir)/plugins/.libs
41 else
42 plugindir = $(libdir)/connman/plugins
43 endif
44
45 AM_CFLAGS = @UDEV_CFLAGS@ @GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ \
46                                         -DSTATEDIR=\""$(statedir)"\" \
47                                         -DPLUGINDIR=\""$(plugindir)"\" \
48                                         -DSTORAGEDIR=\""$(storagedir)\""
49
50 INCLUDES = -I$(top_builddir)/include -I$(top_builddir)/plugins
51
52 EXTRA_DIST = connman-dbus.conf connman-polkit.conf connman.rules
53
54 MAINTAINERCLEANFILES = Makefile.in
55
56 connman.exp: $(connmand_OBJECTS)
57         nm -B *.o | awk '{ print $$3 }' | sort -u | grep -E -e '^connman_' > $@
58
59 connman.ver: connman.exp
60         echo "{ global:" > $@
61         cat $< | sed -e "s/\(.*\)/\1;/" >> $@
62         echo "local: *; };" >> $@
63
64 connman.conf: connman-dbus.conf connman-polkit.conf
65 if POLKIT
66         cp $(top_srcdir)/src/connman-polkit.conf $@
67 else
68         cp $(top_srcdir)/src/connman-dbus.conf $@
69 endif
70
71 92-connman.rules: connman.rules
72         cp $< $@