Merge pull request #628 from madpilot78/Respect_DESTDIR_and_PREFIX

Make the examples Makefile respect DESTDIR and PREFIX env vars.
This commit is contained in:
Luca Deri
2018-11-01 09:20:38 +01:00
committed by GitHub
+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