Make the examples Makefile respect DESTDIR and PREFIX env vars.

This commit is contained in:
Guido Falsi
2018-10-12 17:22:13 +02:00
parent a62f90073a
commit b7b12d5b4e
+2 -1
View File
@@ -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