Add 'make uninstall' target

This commit is contained in:
Arnout Engelen
2016-01-09 15:46:21 +01:00
parent 57fabda440
commit 4bb66ea2ef

View File

@@ -6,7 +6,7 @@ MINORVERSION := 2-SNAPSHOT
prefix := /usr/local prefix := /usr/local
sbin := $(prefix)/sbin sbin := $(prefix)/sbin
man8 := $(prefix)/share/man/man8/ man8 := $(prefix)/share/man/man8
all: nethogs decpcap_test all: nethogs decpcap_test
@@ -28,7 +28,7 @@ NCURSES_LIBS?=-lncurses
tgz: clean tgz: clean
cd .. ; tar czvf nethogs-$(VERSION).$(SUBVERSION).$(MINORVERSION).tar.gz --exclude-vcs nethogs/* cd .. ; tar czvf nethogs-$(VERSION).$(SUBVERSION).$(MINORVERSION).tar.gz --exclude-vcs nethogs/*
.PHONY: check .PHONY: check uninstall
check: check:
echo "Not implemented" echo "Not implemented"
@@ -38,6 +38,10 @@ install: nethogs nethogs.8
install -d -m 755 $(DESTDIR)$(man8) install -d -m 755 $(DESTDIR)$(man8)
install -m 644 nethogs.8 $(DESTDIR)$(man8) install -m 644 nethogs.8 $(DESTDIR)$(man8)
uninstall:
rm $(DESTDIR)$(sbin)/nethogs
rm $(DESTDIR)$(man8)/nethogs.8
test: test.cpp test: test.cpp
$(CXX) $(CXXFLAGS) $(LDFLAGS) test.cpp -o test -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" $(CXX) $(CXXFLAGS) $(LDFLAGS) test.cpp -o test -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"