aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorGuido Falsi <mad@madpilot.net>2018-10-12 17:22:13 +0200
committerGuido Falsi <mad@madpilot.net>2018-10-12 17:22:13 +0200
commitb7b12d5b4eda3433cfbe0ae8c9025a031e79f96e (patch)
tree33059a8fae238719fcd5fc6a0dbf1602b7989a74 /example
parenta62f90073a01d953d64a49320ba54a2dfd8e987e (diff)
Make the examples Makefile respect DESTDIR and PREFIX env vars.
Diffstat (limited to 'example')
-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