File: Makefile.am

package info (click to toggle)
vnstat 1.15-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,192 kB
  • ctags: 799
  • sloc: ansic: 11,415; sh: 1,474; perl: 172; makefile: 109; php: 12
file content (119 lines) | stat: -rw-r--r-- 3,900 bytes parent folder | download
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
SUBDIRS = .

dist_man_MANS = man/vnstat.1 man/vnstat.conf.5 man/vnstatd.1 man/vnstati.1

EXTRA_DIST = cfg examples UPGRADE CHANGES FAQ INSTALL_BSD INSTALL_OSX

bin_PROGRAMS = vnstat
sbin_PROGRAMS = vnstatd
if HAVE_LIBGD
bin_PROGRAMS += vnstati
endif
vnstati_LDADD = $(IMAGELIBS)

vnstat_SOURCES = src/vnstat.c src/vnstat.h \
  src/ifinfo.c src/ifinfo.h \
  src/dbxml.c src/dbxml.h \
  src/dbjson.c src/dbjson.h \
  src/dbshow.c src/dbshow.h \
  src/dbaccess.c src/dbaccess.h \
  src/dbmerge.c src/dbmerge.h \
  src/common.c src/common.h \
  src/misc.c src/misc.h \
  src/cfg.c src/cfg.h \
  src/ibw.c src/ibw.h \
  src/traffic.c src/traffic.h

vnstatd_SOURCES = src/vnstatd.c src/vnstatd.h \
  src/ifinfo.c src/ifinfo.h \
  src/dbaccess.c src/dbaccess.h \
  src/dbcache.c src/dbcache.h \
  src/common.c src/common.h \
  src/misc.c src/misc.h \
  src/cfg.c src/cfg.h \
  src/ibw.c src/ibw.h \
  src/daemon.c src/daemon.h

vnstati_SOURCES = src/vnstati.c src/vnstati.h \
  src/image.c src/image.h \
  src/dbaccess.c src/dbaccess.h \
  src/dbmerge.c src/dbmerge.h \
  src/common.c src/common.h \
  src/misc.c src/misc.h \
  src/cfg.c src/cfg.h

if HAVE_CHECK
TESTS = check_vnstat
check_PROGRAMS = check_vnstat
check_vnstat_CFLAGS = @CHECK_CFLAGS@ \
  -DPROCNETDEV=\"testdir/proc/dev\" \
  -DSYSCLASSNET=\"testdir/sysclassnet\" \
  -DCFGFILE=\"$(top_srcdir)/cfg/vnstat.conf\" \
  -I$(top_srcdir)/src
check_vnstat_LDADD = @CHECK_LIBS@

check_vnstat_SOURCES = tests/vnstat_tests.c tests/vnstat_tests.h \
  tests/common_tests.c tests/common_tests.h \
  tests/database_tests.c tests/database_tests.h \
  tests/config_tests.c tests/config_tests.h \
  tests/ifinfo_tests.c tests/ifinfo_tests.h \
  tests/misc_tests.c tests/misc_tests.h \
  tests/daemon_tests.c tests/daemon_tests.h

check_vnstat_SOURCES += src/cfg.c src/cfg.h \
  src/common.c src/common.h \
  src/daemon.c src/daemon.h \
  src/dbaccess.c src/dbaccess.h \
  src/dbcache.c src/dbcache.h \
  src/dbjson.c src/dbjson.h \
  src/dbmerge.c src/dbmerge.h \
  src/dbshow.c src/dbshow.h \
  src/dbxml.c src/dbxml.h \
  src/ibw.c src/ibw.h \
  src/ifinfo.c src/ifinfo.h \
  src/misc.c src/misc.h \
  src/traffic.c src/traffic.h
endif

setdebug:
	CFLAGS='-Wall -Wextra -g' ./configure

profile:
	CFLAGS='-Wall -Wextra -g -fprofile-arcs -ftest-coverage' LDLIBS='-fprofile-arcs -ftest-coverage' ./configure
	make check
	lcov -c -d $(PWD) -o coverage.lcov
	genhtml coverage.lcov --num-spaces 4 -p $(PWD) -o coverage

myclean: maintainer-clean

release: distcheck
	tar zxf $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
	rm -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
	fakeroot tar zcf $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(PACKAGE_NAME)-$(PACKAGE_VERSION)
	rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION)
	ls -l $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz

install-data-hook: install-exec
	$(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf && \
	  $(MKDIR_P) $(DESTDIR)$(sysconfdir) && \
	  mv -f vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf
	@echo
	@echo "============================================================================"
	@echo "  Note: No service file has been installed for starting the daemon"
	@echo "        automatically. Such setup will need to be created manually"
	@echo "        depending on the used environment. See the included documentation."
	@echo "============================================================================"
	@echo

uninstall-hook:
	-rm -f $(DESTDIR)$(sysconfdir)/vnstat.conf
	-rmdir $(DESTDIR)$(sysconfdir)
	@echo
	@echo "=================================================================="
	@echo "  Note: The database directory has been left untouched."
	@echo "        It will need to be removed manually if no longer needed."
	@echo "=================================================================="
	@echo

clean-local:
	-rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc*