From 3a38086682c5487fa8950ebe3914d5904d5eee88 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Tue, 12 Jul 2016 23:34:31 +0200 Subject: [PATCH] By default don't build libnethogs (but document how to do it) --- Makefile | 19 ++++++++++++------- README.md | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 3528b1e..fd413a0 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 $@ diff --git a/README.md b/README.md index 54162fd..c637b3e 100644 --- a/README.md +++ b/README.md @@ -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