dpdk: Add support for Mellanox ConnectX-4 devices
[vpp.git] / vpp / Makefile.am
index 52ce065..25d7274 100644 (file)
@@ -13,7 +13,7 @@
 
 AUTOMAKE_OPTIONS = foreign subdir-objects
 
-AM_CFLAGS = -Wall @DPDK@ @IPSEC@ @VCGN@ @IPV6SR@
+AM_CFLAGS = -Wall @DPDK@ @DPDK_CRYPTO@ @IPSEC@ @VCGN@ @IPV6SR@ @APICLI@
 
 noinst_PROGRAMS = 
 BUILT_SOURCES =
@@ -31,7 +31,15 @@ vpp_SOURCES =                                        \
 
 vpp_SOURCES +=                                 \
   vpp-api/api.c                                        \
-  vpp-api/custom_dump.c
+  vpp-api/custom_dump.c                                \
+  vpp-api/json_format.c
+
+if WITH_APICLI
+  vpp_SOURCES +=                               \
+  vpp-api/api_format.c                         \
+  vpp-api/api_main.c                           
+endif
+
 
 # comment out to disable stats upload to gmond 
 
@@ -46,9 +54,9 @@ nobase_include_HEADERS =                      \
 # install the API definition, so we can produce java bindings, etc.
 
 apidir = $(prefix)/vpp-api
-api_DATA = vpp-api/vpe.api
+api_DATA = vpp-api/vpe.api.json
 
-BUILT_SOURCES += vpp-api/vpe.api.h app/version.h
+BUILT_SOURCES += vpp-api/vpe.api.h app/version.h vpp-api/vpe.api.json
 
 app/version.o: app/version.h
 
@@ -110,6 +118,12 @@ else
 vpp_LDFLAGS += -l:libdpdk.a
 endif
 vpp_LDFLAGS += -Wl,--no-whole-archive
+if WITH_DPDK_CRYPTO
+vpp_LDADD += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB
+endif
+if WITH_DPDK_MLX5_PMD
+vpp_LDFLAGS += -libverbs -lmlx5 -lnuma
+endif
 endif
 
 vpp_LDADD += -lvppinfra -lm -lpthread -ldl
@@ -118,14 +132,13 @@ if WITH_IPV6SR
   vpp_LDADD += -lcrypto
 endif
 
-SUFFIXES = .api.h .api
+# Set the suffix list
+SUFFIXES = .api.h .api .api.json
 
-%.api.h: %.api
-       @echo "  APIGEN  " $@ ;                                 \
-       mkdir -p `dirname $@` ;                                 \
-       $(CC) $(CPPFLAGS) -E -P -C -x c $^                      \
-       | vppapigen --input - --output $@ --show-name $@
+# The actual %.api.h rule is in .../build-data/packages/suffix-rules.mk
+# and requires a symbolic link at the top of the vpp source tree
 
+include $(top_srcdir)/suffix-rules.mk
 
 noinst_PROGRAMS += test_client