summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 8b733464912c292fa8b8803a517b54156e5d6dd3 (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

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 notifier.c \
			security.c resolver.c ipconfig.c rfkill.c \
			storage.c ipv4.c detect.c rtnl.c inet.c dbus.c

if UDEV
connmand_SOURCES += udev.c
endif

connmand_LDADD = $(top_builddir)/plugins/libbuiltin.la \
		@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.la

CLEANFILES = connman.ver connman.exp connman.conf

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

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