Merge pull request #642 from vitalivanov/pull_buildsys_improvements
Pull buildsys improvements
This commit is contained in:
+3
-1
@@ -19,6 +19,8 @@ compile
|
|||||||
/example/.deps/
|
/example/.deps/
|
||||||
/example/Makefile
|
/example/Makefile
|
||||||
/example/ndpiReader
|
/example/ndpiReader
|
||||||
|
/example/Makefile.dpdk
|
||||||
|
/example/build
|
||||||
*.in
|
*.in
|
||||||
/install-sh
|
/install-sh
|
||||||
*.ko
|
*.ko
|
||||||
@@ -35,7 +37,7 @@ compile
|
|||||||
/m4/ltversion.m4
|
/m4/ltversion.m4
|
||||||
/Makefile
|
/Makefile
|
||||||
/missing
|
/missing
|
||||||
*.[oa]
|
*.[o]
|
||||||
*.obj
|
*.obj
|
||||||
*o.cmd
|
*o.cmd
|
||||||
*o.cmd
|
*o.cmd
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
|
|||||||
|
|
||||||
include $(RTE_SDK)/mk/rte.vars.mk
|
include $(RTE_SDK)/mk/rte.vars.mk
|
||||||
|
|
||||||
APP = ndpiReader
|
APP = ndpiReader.dpdk
|
||||||
LIBNDPI = $(PWD)/../src/lib/libndpi.a
|
LIBNDPI = $(PWD)/../src/lib/libndpi.a
|
||||||
|
|
||||||
SRCS-y := ndpi_util.c ndpiReader.c
|
SRCS-y := ndpi_util.c ndpiReader.c
|
||||||
|
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
CFLAGS += -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-parameter -I $(PWD)/../src/include @CFLAGS@ -DUSE_DPDK
|
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
|
include $(RTE_SDK)/mk/rte.extapp.mk
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -1,7 +1,7 @@
|
|||||||
CC=@CC@
|
CC=@CC@
|
||||||
CFLAGS=-g -I../src/include @CFLAGS@
|
CFLAGS=-g -I../src/include @CFLAGS@
|
||||||
LIBNDPI=../src/lib/libndpi.a
|
LIBNDPI=../src/lib/libndpi.a
|
||||||
LDFLAGS=$(LIBNDPI) -lpcap -lpthread @LDFLAGS@
|
LDFLAGS=$(LIBNDPI) @PCAP_LIB@ -lpthread @LDFLAGS@
|
||||||
OBJS=ndpiReader.o ndpi_util.o
|
OBJS=ndpiReader.o ndpi_util.o
|
||||||
PREFIX?=/usr/local
|
PREFIX?=/usr/local
|
||||||
|
|
||||||
@@ -14,11 +14,18 @@ ndpiReader: $(OBJS) $(LIBNDPI)
|
|||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
install: ndpiReader
|
install: ndpiReader
|
||||||
|
mkdir -p $(DESTDIR)$(PREFIX)/bin/
|
||||||
cp ndpiReader $(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:
|
dpdk:
|
||||||
make -f Makefile.dpdk
|
make -f Makefile.dpdk
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f *.o ndpiReader
|
/bin/rm -f *.o ndpiReader
|
||||||
|
/bin/rm -rf build
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
/bin/rm -f Makefile.dpdk
|
||||||
|
/bin/rm -f Makefile
|
||||||
|
|||||||
+4
-1
@@ -52,7 +52,10 @@ $(NDPI_LIB_SHARED): $(OBJECTS)
|
|||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
clean:
|
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)
|
install: $(NDPI_LIBS)
|
||||||
mkdir -p $(DESTDIR)$(libdir)
|
mkdir -p $(DESTDIR)$(libdir)
|
||||||
|
|||||||
Reference in New Issue
Block a user