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