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