Makefile.am 1.54 KB
Newer Older
1 2 3
bin_PROGRAMS = \
	nmcli

4
AM_CPPFLAGS = \
5
	-I${top_srcdir} \
6
	-I${top_builddir} \
7
	-I${top_srcdir}/include \
Dan Winship's avatar
Dan Winship committed
8 9 10 11
	-I${top_srcdir}/libnm-core \
	-I${top_builddir}/libnm-core \
	-I${top_srcdir}/libnm \
	-I${top_builddir}/libnm \
12
	-I${top_srcdir}/clients/common \
13
	$(GLIB_CFLAGS) \
14
	-DG_LOG_DOMAIN=\""nmcli"\" \
15
	-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
16
	-DNMCLI_LOCALEDIR=\"$(datadir)/locale\"
17 18

nmcli_SOURCES = \
19 20
	agent.c \
	agent.h \
21 22
	common.c \
	common.h \
23 24 25 26
	connections.c \
	connections.h \
	devices.c \
	devices.h \
27 28
	general.c \
	general.h \
29 30
	settings.c \
	settings.h \
31 32 33
	nmcli.c \
	nmcli.h \
	utils.c \
34
	utils.h \
35 36
	polkit-agent.c \
	polkit-agent.h \
37 38 39 40
	\
	$(srcdir)/../common/nm-secret-agent-simple.c \
	$(srcdir)/../common/nm-secret-agent-simple.h \
	$(NULL)
41 42 43

nmcli_LDADD = \
	$(GLIB_LIBS) \
44
	$(READLINE_LIBS) \
Dan Winship's avatar
Dan Winship committed
45
	$(top_builddir)/libnm/libnm.la
46

47 48 49 50 51 52
if WITH_POLKIT_AGENT
AM_CPPFLAGS += $(POLKIT_CFLAGS)
nmcli_SOURCES += $(srcdir)/../common/nm-polkit-listener.c $(srcdir)/../common/nm-polkit-listener.h
nmcli_LDADD += $(POLKIT_LIBS)
endif

53
if BUILD_SETTING_DOCS
54
settings-docs.c: settings-docs.xsl $(top_builddir)/libnm/nm-setting-docs.xml
55
	$(AM_V_GEN) xsltproc --output $@ $^
56

57
BUILT_SOURCES = settings-docs.c
58
CLEANFILES = settings-docs.c
59 60 61
endif

EXTRA_DIST = settings-docs.c settings-docs.xsl
62 63 64 65 66 67 68 69 70 71 72

completiondir = $(datadir)/bash-completion/completions

install-data-hook:
	$(mkinstalldirs) $(DESTDIR)$(completiondir)
	$(INSTALL_DATA) $(srcdir)/nmcli-completion $(DESTDIR)$(completiondir)/nmcli

uninstall-hook:
	rm -f $(DESTDIR)$(completiondir)/nmcli

EXTRA_DIST += nmcli-completion