Update build system to find manpage again (fixes #67)
This commit is contained in:
6
Makefile
6
Makefile
@@ -2,6 +2,9 @@ export VERSION := 0
|
|||||||
export SUBVERSION := 8
|
export SUBVERSION := 8
|
||||||
export MINORVERSION := 2-SNAPSHOT
|
export MINORVERSION := 2-SNAPSHOT
|
||||||
|
|
||||||
|
#export PREFIX := /usr
|
||||||
|
export PREFIX ?= /usr/local
|
||||||
|
|
||||||
all: nethogs decpcap_test test
|
all: nethogs decpcap_test test
|
||||||
$(MAKE) -C src -f MakeApp.mk $@
|
$(MAKE) -C src -f MakeApp.mk $@
|
||||||
$(MAKE) -C src -f MakeLib.mk $@
|
$(MAKE) -C src -f MakeLib.mk $@
|
||||||
@@ -16,13 +19,16 @@ check:
|
|||||||
install:
|
install:
|
||||||
$(MAKE) -C src -f MakeApp.mk $@
|
$(MAKE) -C src -f MakeApp.mk $@
|
||||||
$(MAKE) -C src -f MakeLib.mk $@
|
$(MAKE) -C src -f MakeLib.mk $@
|
||||||
|
$(MAKE) -C doc $@
|
||||||
|
|
||||||
install_dev:
|
install_dev:
|
||||||
$(MAKE) -C src -f MakeLib.mk $@
|
$(MAKE) -C src -f MakeLib.mk $@
|
||||||
|
$(MAKE) -C doc $@
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(MAKE) -C src -f MakeApp.mk $@
|
$(MAKE) -C src -f MakeApp.mk $@
|
||||||
$(MAKE) -C src -f MakeLib.mk $@
|
$(MAKE) -C src -f MakeLib.mk $@
|
||||||
|
$(MAKE) -C doc $@
|
||||||
|
|
||||||
nethogs:
|
nethogs:
|
||||||
$(MAKE) -C src -f MakeApp.mk $@
|
$(MAKE) -C src -f MakeApp.mk $@
|
||||||
|
|||||||
11
doc/Makefile
Normal file
11
doc/Makefile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
all:
|
||||||
|
|
||||||
|
man8 := $(PREFIX)/share/man/man8
|
||||||
|
|
||||||
|
install: nethogs.8
|
||||||
|
install -d -m 755 $(DESTDIR)$(man8)
|
||||||
|
install -m 644 nethogs.8 $(DESTDIR)$(man8)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm $(DESTDIR)$(man8)/nethogs.8 || true
|
||||||
|
|
||||||
@@ -1,8 +1,4 @@
|
|||||||
#prefix := /usr
|
sbin := $(PREFIX)/sbin
|
||||||
prefix := /usr/local
|
|
||||||
|
|
||||||
sbin := $(prefix)/sbin
|
|
||||||
man8 := $(prefix)/share/man/man8
|
|
||||||
|
|
||||||
all: nethogs decpcap_test
|
all: nethogs decpcap_test
|
||||||
|
|
||||||
@@ -21,19 +17,16 @@ NCURSES_LIBS?=-lncurses
|
|||||||
check:
|
check:
|
||||||
@echo "Not implemented"
|
@echo "Not implemented"
|
||||||
|
|
||||||
install: nethogs nethogs.8
|
install: nethogs
|
||||||
install -d -m 755 $(DESTDIR)$(sbin)
|
install -d -m 755 $(DESTDIR)$(sbin)
|
||||||
install -m 755 nethogs $(DESTDIR)$(sbin)
|
install -m 755 nethogs $(DESTDIR)$(sbin)
|
||||||
install -d -m 755 $(DESTDIR)$(man8)
|
|
||||||
install -m 644 nethogs.8 $(DESTDIR)$(man8)
|
|
||||||
@echo
|
@echo
|
||||||
@echo "Installed nethogs to $(DESTDIR)$(sbin)"
|
@echo "Installed nethogs to $(DESTDIR)$(sbin)"
|
||||||
@echo
|
@echo
|
||||||
@echo "You might have to add this directory to your PATH and/or refresh your shells' path cache with a command like 'hash -r'."
|
@echo "You might have to add this directory to your PATH and/or refresh your shells' path cache with a command like 'hash -r'."
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm $(DESTDIR)$(sbin)/nethogs
|
rm $(DESTDIR)$(sbin)/nethogs || true
|
||||||
rm $(DESTDIR)$(man8)/nethogs.8
|
|
||||||
|
|
||||||
nethogs: main.cpp nethogs.cpp $(OBJS)
|
nethogs: main.cpp nethogs.cpp $(OBJS)
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) main.cpp $(OBJS) -o nethogs -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) main.cpp $(OBJS) -o nethogs -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ LIBRARY=libnethogs.so
|
|||||||
LIBNAME=$(LIBRARY).$(LIBVERSION).$(LIBSUBVERSION).$(LIBMINORVERSION)
|
LIBNAME=$(LIBRARY).$(LIBVERSION).$(LIBSUBVERSION).$(LIBMINORVERSION)
|
||||||
SO_NAME=$(LIBRARY).$(LIBVERSION)
|
SO_NAME=$(LIBRARY).$(LIBVERSION)
|
||||||
|
|
||||||
prefix := /usr/local
|
libdir := $(PREFIX)/lib
|
||||||
libdir := $(prefix)/lib
|
incdir := $(PREFIX)/include
|
||||||
incdir := $(prefix)/include
|
|
||||||
|
|
||||||
all: $(LIBNAME) libnethogs.a
|
all: $(LIBNAME) libnethogs.a
|
||||||
|
|
||||||
@@ -45,7 +44,7 @@ install: $(LIBNAME)
|
|||||||
install -d -m 755 $(DESTDIR)$(libdir)
|
install -d -m 755 $(DESTDIR)$(libdir)
|
||||||
install -m 755 $(LIBNAME) $(DESTDIR)$(libdir)
|
install -m 755 $(LIBNAME) $(DESTDIR)$(libdir)
|
||||||
@echo "Installed $(LIBNAME) to $(DESTDIR)$(libdir)"
|
@echo "Installed $(LIBNAME) to $(DESTDIR)$(libdir)"
|
||||||
ldconfig
|
ldconfig || true
|
||||||
|
|
||||||
install_dev: install
|
install_dev: install
|
||||||
@ln -f -s $(DESTDIR)$(libdir)/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBRARY)
|
@ln -f -s $(DESTDIR)$(libdir)/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBRARY)
|
||||||
@@ -54,14 +53,14 @@ install_dev: install
|
|||||||
install -d -m 755 $(DESTDIR)$(incdir)
|
install -d -m 755 $(DESTDIR)$(incdir)
|
||||||
install -m 755 libnethogs.h $(DESTDIR)$(incdir)
|
install -m 755 libnethogs.h $(DESTDIR)$(incdir)
|
||||||
@echo "Installed libnethogs.h to $(DESTDIR)$(incdir)"
|
@echo "Installed libnethogs.h to $(DESTDIR)$(incdir)"
|
||||||
ldconfig
|
ldconfig || true
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
|
rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
|
||||||
rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
|
rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
|
||||||
rm -f $(DESTDIR)$(libdir)/libnethogs.a
|
rm -f $(DESTDIR)$(libdir)/libnethogs.a
|
||||||
rm -f $(DESTDIR)$(incdir)/libnethogs.h
|
rm -f $(DESTDIR)$(incdir)/libnethogs.h
|
||||||
ldconfig
|
ldconfig || true
|
||||||
|
|
||||||
$(LIBNAME): $(OBJS)
|
$(LIBNAME): $(OBJS)
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(OBJS) -o $@ -lpcap
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(OBJS) -o $@ -lpcap
|
||||||
|
|||||||
Reference in New Issue
Block a user