Skip to content

Commit

Permalink
Fix NF Makefiles' NFLib and ONVMHelper Includes (#279)
Browse files Browse the repository at this point in the history
With the introduction of NF config file support in dca9f75, the Scaling
Example and NDPI Stats NFs' Makefiles were not updated to include and
link the correct paths/libs to build cJSON dependencies correctly.

This change adds the appropriate CFLAGS and LDFLAGS to build things.
  • Loading branch information
nks5295 authored Nov 20, 2018
1 parent 8984e68 commit 8f16c8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/ndpi_stats/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ SRCS-y := ndpi_stats.c ndpi_util.c
ONVM= $(SRCDIR)/../../onvm

CFLAGS += -O3 $(USER_FLAGS)
#CFLAGS += $(WERROR_FLAGS) -O3 $(USER_FLAGS)
CFLAGS += -I$(ONVM)/onvm_nflib
LDFLAGS += $(ONVM)/onvm_nflib/$(RTE_TARGET)/libonvm.a

CFLAGS += -I$(NDPI_HOME)/src/include
LDFLAGS += $(NDPI_HOME)/lib/libndpi.a

CFLAGS += -I$(ONVM)/onvm_nflib
CFLAGS += -I$(ONVM)/lib
LDFLAGS += $(ONVM)/onvm_nflib/$(RTE_TARGET)/libonvm.a
LDFLAGS += $(ONVM)/lib/$(RTE_TARGET)/lib/libonvmhelper.a -lm

LDFLAGS += -lpcap

include $(RTE_SDK)/mk/rte.extapp.mk
2 changes: 2 additions & 0 deletions examples/scaling_example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ ONVM ?= $(SRCDIR)/../../onvm
CFLAGS += $(WERROR_FLAGS) -O3 $(USER_FLAGS)

CFLAGS += -I$(ONVM)/onvm_nflib
CFLAGS += -I$(ONVM)/lib
LDFLAGS += $(ONVM)/onvm_nflib/$(RTE_TARGET)/libonvm.a
LDFLAGS += $(ONVM)/lib/$(RTE_TARGET)/lib/libonvmhelper.a -lm

# workaround for a gcc bug with noreturn attribute
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
Expand Down

0 comments on commit 8f16c8c

Please sign in to comment.