summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/svm.am7
-rw-r--r--src/vlib-api.am8
-rw-r--r--src/vnet.am7
-rw-r--r--src/vpp-api-test.am2
-rw-r--r--src/vpp.am33
5 files changed, 41 insertions, 16 deletions
diff --git a/src/svm.am b/src/svm.am
index d91eaa272a2..2cd385bd037 100644
--- a/src/svm.am
+++ b/src/svm.am
@@ -15,14 +15,17 @@ bin_PROGRAMS += svmtool svmdbtool
nobase_include_HEADERS += svm/svm.h svm/ssvm.h svm/svmdb.h
-libsvmdir = ${libdir}
-libsvm_LTLIBRARIES = libsvm.la libsvmdb.la
+lib_LTLIBRARIES += libsvm.la libsvmdb.la
+libsvm_la_LIBADD = libvppinfra.la -lrt -lpthread
+libsvm_la_DEPENDENCIES = libvppinfra.la
libsvm_la_SOURCES = svm/svm.c svm/ssvm.c
svmtool_SOURCES = svm/svmtool.c
svmtool_LDADD = libsvm.la libvppinfra.la -lpthread -lrt
+libsvmdb_la_LIBADD = libvppinfra.la libsvm.la
+libsvmdb_la_DEPENDENCIES = libvppinfra.la libsvm.la
libsvmdb_la_SOURCES = svm/svmdb.c
svmdbtool_SOURCES = svm/svmdbtool.c
diff --git a/src/vlib-api.am b/src/vlib-api.am
index 80eb760d108..128cc07a1d5 100644
--- a/src/vlib-api.am
+++ b/src/vlib-api.am
@@ -14,6 +14,8 @@
lib_LTLIBRARIES += libvlibapi.la libvlibmemory.la libvlibmemoryclient.la \
libvlibsocket.la
+libvlibapi_la_LIBADD = libvppinfra.la
+libvlibapi_la_DEPENDENCIES = libvppinfra.la libvlib.la
libvlibapi_la_SOURCES = \
vlibapi/api.h \
vlibapi/api_helper_macros.h \
@@ -22,6 +24,8 @@ libvlibapi_la_SOURCES = \
nobase_include_HEADERS += vlibapi/api.h vlibapi/api_helper_macros.h
+libvlibmemory_la_LIBADD = libvppinfra.la libsvm.la -lpthread
+libvlibmemory_la_DEPENDENCIES = libvppinfra.la libsvm.la libvlib.la
libvlibmemory_la_SOURCES = \
vlibmemory/api.h \
vlibmemory/memclnt.api \
@@ -32,6 +36,8 @@ libvlibmemory_la_SOURCES = \
vlibmemory/unix_shared_memory_queue.c \
vlibmemory/unix_shared_memory_queue.h
+libvlibmemoryclient_la_LIBADD = libvppinfra.la libsvm.la -lpthread
+libvlibmemoryclient_la_DEPENDENCIES = libvppinfra.la libsvm.la libvlib.la
libvlibmemoryclient_la_SOURCES = \
vlibmemory/api.h \
vlibmemory/memclnt.api \
@@ -49,6 +55,8 @@ nobase_include_HEADERS += \
vlibmemory/unix_shared_memory_queue.h \
vlibmemory/memclnt.api.h
+libvlibsocket_la_LIBADD = libvppinfra.la
+libvlibsocket_la_DEPENDENCIES = libvppinfra.la
libvlibsocket_la_SOURCES = \
vlibsocket/api.h \
vlibsocket/sockclnt.api \
diff --git a/src/vnet.am b/src/vnet.am
index 1baa1d25afb..16ade4d1228 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -14,7 +14,12 @@
libvnet_la_SOURCES =
libvnetplugin_la_SOURCES =
-libvnet_la_LIBAD = libvppinfra.la libvlib.la libsvm.la
+libvnet_la_LIBADD = libvppinfra.la libsvm.la
+libvnet_la_DEPENDENCIES = libvppinfra.la libvlib.la libsvmdb.la libsvm.la libvlibapi.la libvlibmemory.la libvlibmemoryclient.la
+
+if WITH_IPV6SR
+libvnet_la_LIBADD += -lcrypto
+endif
########################################
# Generic stuff
diff --git a/src/vpp-api-test.am b/src/vpp-api-test.am
index 66d223c0a05..c788666eae7 100644
--- a/src/vpp-api-test.am
+++ b/src/vpp-api-test.am
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+libvatplugin_la_LIBADD = libvppinfra.la
+libvatplugin_la_DEPENDENCIES = libvppinfra.la
libvatplugin_la_SOURCES = \
vat/plugin_api.c
diff --git a/src/vpp.am b/src/vpp.am
index 77010e1f36a..3bb2c1beaae 100644
--- a/src/vpp.am
+++ b/src/vpp.am
@@ -44,19 +44,30 @@ nobase_include_HEADERS += \
API_FILES += vpp/api/vpe.api
-BUILT_SOURCES += vpp/app/version.h
+BUILT_SOURCES += .version
vpp/app/version.o: vpp/app/version.h
-.PHONY: vpp/app/version.h
+.PHONY: .version
+
+VPP_VERSION = $(shell $(srcdir)/scripts/version)
+
+# update version.h only when version changes, to avoid
+# unnecessary re-linking of vpp binary
+
+.version:
+ @if [ "$$(cat .version 2> /dev/null)" != "$(VPP_VERSION)" ] ; then \
+ f="vpp/app/version.h" ;\
+ echo " VERSION $$f ($(VPP_VERSION))" ;\
+ echo $(VPP_VERSION) > .version ;\
+ echo "#define VPP_BUILD_DATE \"$$(date)\"" > $$f ;\
+ echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $$f ;\
+ echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $$f ;\
+ echo -n "#define VPP_BUILD_TOPDIR " >> $$f ;\
+ echo "\"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $$f ;\
+ echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\
+ fi
-vpp/app/version.h:
- @echo " VERSION " $@
- @echo "#define VPP_BUILD_DATE \"$$(date)\"" > $@
- @echo "#define VPP_BUILD_USER \"$$(whoami)\"" >> $@
- @echo "#define VPP_BUILD_HOST \"$$(hostname)\"" >> $@
- @echo "#define VPP_BUILD_TOPDIR \"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $@
- @echo "#define VPP_BUILD_VER \"$$($(srcdir)/scripts/version)\"" >> $@
# Generate a plugin configuration script. Misconfiguring a
# plugin can cause very subtle problems.
@@ -103,10 +114,6 @@ bin_vpp_LDADD = \
bin_vpp_LDFLAGS = $(DPDK_LD_FLAGS)
bin_vpp_LDADD += libvppinfra.la -lm -lpthread -ldl $(DPDK_LD_ADD)
-if WITH_IPV6SR
- bin_vpp_LDADD += -lcrypto
-endif
-
noinst_PROGRAMS += bin/test_client
bin_test_client_SOURCES = \