aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <lucaderi@users.noreply.github.com>2018-11-01 09:20:38 +0100
committerGitHub <noreply@github.com>2018-11-01 09:20:38 +0100
commit6a4324f451536d98dd068859d189449e2584ec68 (patch)
tree6d6de845157591fca14eb2810ef537589c8ba743
parentde37d08c241d2dec47e7e11e2f80a9516399f49f (diff)
parentb7b12d5b4eda3433cfbe0ae8c9025a031e79f96e (diff)
Merge pull request #628 from madpilot78/Respect_DESTDIR_and_PREFIX
Make the examples Makefile respect DESTDIR and PREFIX env vars.
-rw-r--r--example/Makefile.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/Makefile.in b/example/Makefile.in
index d3d4aed20..8c18f94dc 100644
--- a/example/Makefile.in
+++ b/example/Makefile.in
@@ -3,6 +3,7 @@ CFLAGS=-g -I../src/include @CFLAGS@
LIBNDPI=../src/lib/libndpi.a
LDFLAGS=$(LIBNDPI) -lpcap -lpthread @LDFLAGS@
OBJS=ndpiReader.o ndpi_util.o
+PREFIX?=/usr/local
all: ndpiReader
@@ -13,7 +14,7 @@ ndpiReader: $(OBJS) $(LIBNDPI)
$(CC) $(CFLAGS) -c $< -o $@
install:
- cp ndpiReader /usr/local/bin
+ cp ndpiReader $(DESTDIR)$(PREFIX)/bin
clean:
/bin/rm -f *.o ndpiReader