diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | example/Makefile.dpdk.in | 4 | ||||
-rw-r--r-- | example/Makefile.in | 9 | ||||
-rw-r--r-- | src/lib/Makefile.in | 5 |
4 files changed, 17 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore index 759db411c..ebacea3cd 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ compile /example/.deps/ /example/Makefile /example/ndpiReader +/example/Makefile.dpdk +/example/build *.in /install-sh *.ko @@ -35,7 +37,7 @@ compile /m4/ltversion.m4 /Makefile /missing -*.[oa] +*.[o] *.obj *o.cmd *o.cmd diff --git a/example/Makefile.dpdk.in b/example/Makefile.dpdk.in index 8519d7d0e..d96975483 100644 --- a/example/Makefile.dpdk.in +++ b/example/Makefile.dpdk.in @@ -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 diff --git a/example/Makefile.in b/example/Makefile.in index 3e0f25d91..050cac8e1 100644 --- a/example/Makefile.in +++ b/example/Makefile.in @@ -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 @@ -14,11 +14,18 @@ ndpiReader: $(OBJS) $(LIBNDPI) $(CC) $(CFLAGS) -c $< -o $@ install: ndpiReader + mkdir -p $(DESTDIR)$(PREFIX)/bin/ cp ndpiReader $(DESTDIR)$(PREFIX)/bin/ + [ -f build/app/ndpiReader.dpdk ] && cp build/app/ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true + [ -f ndpiReader.dpdk ] && cp ndpiReader.dpdk $(DESTDIR)$(PREFIX)/bin/ || true dpdk: make -f Makefile.dpdk clean: /bin/rm -f *.o ndpiReader + /bin/rm -rf build +distclean: clean + /bin/rm -f Makefile.dpdk + /bin/rm -f Makefile diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in index 1f07773e9..297869fe3 100644 --- a/src/lib/Makefile.in +++ b/src/lib/Makefile.in @@ -52,7 +52,10 @@ $(NDPI_LIB_SHARED): $(OBJECTS) $(CC) $(CFLAGS) -c $< -o $@ clean: - /bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo + /bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo $(NDPI_LIB_SHARED) + +distclean: clean + /bin/rm -f Makefile install: $(NDPI_LIBS) mkdir -p $(DESTDIR)$(libdir) |