build: correct example dpdk linking with pcap.

- take libpcap from configure information.
- clean up distclean.

Signed-off-by: Vitaliy Ivanov <vitaliyi@interfacemasters.com>
This commit is contained in:
Vitaliy Ivanov
2018-11-28 16:40:34 +02:00
parent 5429063546
commit ea7e7c753b
3 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -14,14 +14,14 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
include $(RTE_SDK)/mk/rte.vars.mk
APP = ndpiReader
APP = ndpiReader.dpdk
LIBNDPI = $(PWD)/../src/lib/libndpi.a
SRCS-y := ndpi_util.c ndpiReader.c
CFLAGS += -g
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
LDLIBS = $(LIBNDPI) -lpthread @LDFLAGS@
LDLIBS = $(LIBNDPI) @PCAP_LIB@ -lpthread @LDFLAGS@
include $(RTE_SDK)/mk/rte.extapp.mk
+5 -1
View File
@@ -1,7 +1,7 @@
CC=@CC@
CFLAGS=-g -I../src/include @CFLAGS@
LIBNDPI=../src/lib/libndpi.a
LDFLAGS=$(LIBNDPI) -lpcap -lpthread @LDFLAGS@
LDFLAGS=$(LIBNDPI) @PCAP_LIB@ -lpthread @LDFLAGS@
OBJS=ndpiReader.o ndpi_util.o
PREFIX?=/usr/local
@@ -21,4 +21,8 @@ dpdk:
clean:
/bin/rm -f *.o ndpiReader
/bin/rm -rf build
distclean: clean
/bin/rm -f Makefile.dpdk
/bin/rm -f Makefile
+3
View File
@@ -54,6 +54,9 @@ $(NDPI_LIB_SHARED): $(OBJECTS)
clean:
/bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo
distclean: clean
/bin/rm -f Makefile
install: $(NDPI_LIBS)
mkdir -p $(DESTDIR)$(libdir)
cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/