Skip to content

Commit

Permalink
By default don't build libnethogs (but document how to do it)
Browse files Browse the repository at this point in the history
  • Loading branch information
raboof committed Jul 12, 2016
1 parent 57b668b commit 3a38086
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
export VERSION := $(shell ./determineVersion.sh)
export VERSION := $(shell ./determineVersion.sh)

#export PREFIX := /usr
export PREFIX ?= /usr/local

all: nethogs decpcap_test test
$(MAKE) -C src -f MakeApp.mk $@
$(MAKE) -C src -f MakeLib.mk $@
all: decpcap_test test nethogs

.PHONY: tgz release
.PHONY: tgz release check install install_lib install_dev uninstall uninstall_lib nethogs libnethogs decpcap_test test clean all
tgz: clean
git archive --prefix="nethogs-$(VERSION)/" -o "../nethogs-$(VERSION).tar.gz" HEAD

Expand All @@ -23,21 +21,28 @@ check:

install:
$(MAKE) -C src -f MakeApp.mk $@
$(MAKE) -C src -f MakeLib.mk $@
$(MAKE) -C doc $@

install_lib:
$(MAKE) -C src -f MakeLib.mk install

install_dev:
$(MAKE) -C src -f MakeLib.mk $@
$(MAKE) -C doc $@

uninstall:
$(MAKE) -C src -f MakeApp.mk $@
$(MAKE) -C src -f MakeLib.mk $@
$(MAKE) -C doc $@

uninstall_lib:
$(MAKE) -C src -f MakeLib.mk uninstall

nethogs:
$(MAKE) -C src -f MakeApp.mk $@

libnethogs:
$(MAKE) -C src -f MakeLib.mk all

decpcap_test:
$(MAKE) -C src -f MakeApp.mk $@

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ compatibility while we look for the right abstraction points. Packaging
libnethogs as an independent package is currently discouraged, as the chance
of different applications successfully using the same libnethogs are slim.

Build it with `make libnethogs`, install with `make install_lib` or `make install_dev`.

libnethogs is being used in https://github.com/mb-gh/gnethogs

links
Expand Down

0 comments on commit 3a38086

Please sign in to comment.