diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2018-11-28 23:20:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 23:20:34 +0100 |
commit | f1e5ed47660a37d4a15b93bf79faf7a0357754d2 (patch) | |
tree | edc3512d94f046fc2424ac7f31d0b4818ace6af7 | |
parent | 5429063546fe8a73adc50e2d6eac4e00046c4424 (diff) | |
parent | a3abbc3ebb851c7316b6694efc5036d40324d103 (diff) |
Merge pull request #642 from vitalivanov/pull_buildsys_improvements
Pull buildsys improvements
-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) |