From b7b12d5b4eda3433cfbe0ae8c9025a031e79f96e Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Fri, 12 Oct 2018 17:22:13 +0200 Subject: Make the examples Makefile respect DESTDIR and PREFIX env vars. --- example/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3