From c9e65eb4b172ba4c821064bad4e56e822def6dca Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sun, 7 Dec 2008 21:53:15 +0000 Subject: [PATCH] More Makefile improvements by Petr Uzel: installing to /sbin, adding conninode and removing some trailing whitespace. --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index facff00..ccfabc1 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,10 @@ MINORVERSION := snapshot #DESTDIR := /usr DESTDIR := /usr/local -bin := $(DESTDIR)/bin +sbin := $(DESTDIR)/sbin man8 := $(DESTDIR)/share/man/man8/ -all: nethogs decpcap_test +all: nethogs decpcap_test # nethogs_testsum CFLAGS=-g -Wall -Wextra @@ -24,10 +24,10 @@ check: echo "Not implemented" install: nethogs nethogs.8 - install -d -m 755 $(bin) - install -m 755 nethogs $(bin) - install -d -m 755 $(man8) - install -m 644 nethogs.8 $(man8) + install -d -m 755 $(bin) + install -m 755 nethogs $(bin) + install -d -m 755 $(man8) + install -m 644 nethogs.8 $(man8) nethogs: nethogs.cpp $(OBJS) $(CXX) $(CFLAGS) nethogs.cpp $(OBJS) -o nethogs -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" @@ -35,7 +35,7 @@ nethogs_testsum: nethogs_testsum.cpp $(OBJS) $(CXX) $(CFLAGS) -g nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" decpcap_test: decpcap_test.cpp decpcap.o - $(CXX) $(CFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm + $(CXX) $(CFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm #-lefence @@ -51,6 +51,8 @@ decpcap.o: decpcap.c decpcap.h $(CC) $(CFLAGS) -c decpcap.c inode2prog.o: inode2prog.cpp inode2prog.h nethogs.h $(CXX) $(CFLAGS) -c inode2prog.cpp +conninode.o: conninode.cpp nethogs.h conninode.h + $(CXX) $(CFLAGS) -c conninode.cpp cui.o: cui.cpp cui.h nethogs.h $(CXX) $(CFLAGS) -c cui.cpp -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"