summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 17c276839325dffa47404fc029b5ee124b868fc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

if DATAFILES
dbusdir = @DBUS_DATADIR@

dbus_DATA = connman.conf
endif

sbin_PROGRAMS = connmand

connmand_SOURCES = main.c connman.h log.c selftest.c error.c plugin.c \
			element.c device.c network.c connection.c \
			manager.c profile.c service.c agent.c \
			security.c resolver.c ipconfig.c notifier.c \
			storage.c ipv4.c detect.c rtnl.c inet.c dbus.c

if UDEV
connmand_SOURCES += udev.c

if DATAFILES
rulesdir = @UDEV_DATADIR@

rules_DATA = 92-connman.rules
endif
endif

connmand_LDADD = $(top_builddir)/plugins/libbuiltin.a \
		@GDBUS_LIBS@ @GLIB_LIBS@ @GTHREAD_LIBS@ @UDEV_LIBS@ -ldl

connmand_LDFLAGS = -Wl,--export-dynamic -Wl,--version-script=connman.ver

connmand_DEPENDENCIES = connman.ver $(top_builddir)/plugins/libbuiltin.a

CLEANFILES = connman.ver connman.exp connman.conf 92-connman.rules

statedir = $(localstatedir)/run/connman

storagedir = $(localstatedir)/lib/connman

if MAINTAINER_MODE
plugindir = $(abs_top_srcdir)/plugins/.libs
else
plugindir = $(libdir)/connman/plugins
endif

AM_CFLAGS = @UDEV_CFLAGS@ @GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ \
					-DSTATEDIR=\""$(statedir)"\" \
					-DPLUGINDIR=\""$(plugindir)"\" \
					-DSTORAGEDIR=\""$(storagedir)\""

INCLUDES = -I$(top_builddir)/include -I$(top_builddir)/plugins

EXTRA_DIST = connman-dbus.conf connman-polkit.conf connman.rules

MAINTAINERCLEANFILES = Makefile.in

connman.exp: $(connmand_OBJECTS)
	nm -B *.o | awk '{ print $$3 }' | sort -u | grep -E -e '^connman_' > $@

connman.ver: connman.exp
	echo "{ global:" > $@
	cat $< | sed -e "s/\(.*\)/\1;/" >> $@
	echo "local: *; };" >> $@

connman.conf: connman-dbus.conf connman-polkit.conf
if POLKIT
	cp $(top_srcdir)/src/connman-polkit.conf $@
else
	cp $(top_srcdir)/src/connman-dbus.conf $@
endif

92-connman.rules: connman.rules
	cp $< $@