aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-04-25 19:11:15 +0200
committerNeale Ranns <nranns@cisco.com>2018-04-27 11:35:07 +0000
commit164e5f8c63652028ecb9c3570e1ea8618b163071 (patch)
tree7423f5abbc61b761df9a679c7974f17613736020 /test
parentaa682a39b76ee043f65313f23e134bf18fe7a47e (diff)
Move VOM to extras/vom
Change-Id: Iea174f03dfba3bd06024db0f0cc373532300dcae Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/ext/Makefile46
1 files changed, 36 insertions, 10 deletions
diff --git a/test/ext/Makefile b/test/ext/Makefile
index 3959ac6bf2f..d1f3a7b7a8a 100644
--- a/test/ext/Makefile
+++ b/test/ext/Makefile
@@ -8,14 +8,19 @@ ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID))
VAPI_CPPBIN=
endif
-VAPI_LIBS = -L$(VPP_TEST_BUILD_DIR)/vpp/.libs/ -L$(VPP_TEST_BUILD_DIR)/vpp/vpp-api/vapi/.libs/ -lvppinfra -lvlibmemoryclient -lsvm -lpthread -lcheck -lrt -lm -lvapiclient
+VAPI_LIBS = \
+ -L$(VPP_TEST_INSTALL_PATH)/vpp/lib64 \
+ -lvppinfra -lvlibmemoryclient -lsvm -lpthread -lcheck -lrt -lm -lvapiclient
+
ifneq ($(filter centos opensuse,$(OS_ID)),$(OS_ID))
VAPI_LIBS += -lsubunit
endif
-CFLAGS = -std=gnu99 -g -Wall -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(VAPI_BINDIR)
-CPPFLAGS = -std=c++11 -g -Wall -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(VAPI_BINDIR)
-all: $(VAPI_CBIN) $(VAPI_CPPBIN) $(VOM_BINDIR) $(VOM_BIN)
+FLAGS = -g -Wall -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(VAPI_BINDIR)
+CFLAGS = -std=gnu99 $(FLAGS)
+CPPFLAGS = -std=c++11 $(FLAGS) -I$(WS_ROOT)/extras/vom
+
+all: $(VAPI_CBIN) $(VAPI_CPPBIN) $(VOM_BIN)
$(VAPI_BINDIR):
mkdir -p $(VAPI_BINDIR)
@@ -28,21 +33,30 @@ $(VAPI_BINDIR)/fake.api.vapi.h: fake.api.json $(WS_ROOT)/src/vpp-api/vapi/vapi_c
$(VAPI_BINDIR)/fake.api.vapi.hpp: fake.api.json $(WS_ROOT)/src/vpp-api/vapi/vapi_cpp_gen.py | $(VAPI_BINDIR)
$(WS_ROOT)/src/vpp-api/vapi/vapi_cpp_gen.py --prefix $(VAPI_BINDIR) $<
-$(VAPI_CBIN): $(CSRC) $(VPP_TEST_BUILD_DIR)/vpp/vpp-api/vapi/.libs/libvapiclient.so $(VPP_TEST_BUILD_DIR)/vpp/.libs/libvppinfra.so $(VPP_TEST_BUILD_DIR)/vpp/.libs/libvlibmemoryclient.so $(VPP_TEST_BUILD_DIR)/vpp/.libs/libsvm.so $(VAPI_BINDIR)/fake.api.vapi.h
+$(VAPI_CBIN): $(CSRC) $(VAPI_BINDIR)/fake.api.vapi.h
$(CC) -o $@ $(CFLAGS) $(CSRC) $(VAPI_LIBS)
+$(VAPI_CBIN).d: $(CSRC) $(VAPI_BINDIR)
+ $(CC) -o $@ $(CFLAGS) -MM -MT '$(VAPI_CBIN)' $(CSRC) > $@
+
+
CPPSRC = vapi_cpp_test.cpp
-$(VAPI_CPPBIN): $(CPPSRC) $(VPP_TEST_BUILD_DIR)/vpp/vpp-api/vapi/.libs/libvapiclient.so $(VPP_TEST_BUILD_DIR)/vpp/.libs/libvppinfra.so $(VPP_TEST_BUILD_DIR)/vpp/.libs/libvlibmemoryclient.so $(VPP_TEST_BUILD_DIR)/vpp/.libs/libsvm.so $(VAPI_BINDIR)/fake.api.vapi.hpp
+$(VAPI_CPPBIN): $(CPPSRC) $(VAPI_BINDIR)/fake.api.vapi.hpp
$(CXX) -o $@ $(CPPFLAGS) $(CPPSRC) $(VAPI_LIBS)
+$(VAPI_CPPBIN).d: $(CPPSRC) $(VAPI_BINDIR)
+ $(CXX) -o $@ $(CPPFLAGS) -MM -MT '$(VAPI_CPPBIN)' $(CPPSRC) > $@
+
VOM_CPPSRC = vom_test.cpp
$(VOM_BINDIR):
mkdir -p $(VOM_BINDIR)
-LIB_VOM = $(VPP_TEST_BUILD_DIR)/vpp/vpp-api/vom/.libs/libvom.so
-VOM_LIBS = $(LIB_VOM) \
+LIB_VOM = -lvom
+VOM_LIBS = \
+ -L$(VPP_TEST_INSTALL_PATH)/vom/lib64 \
+ -lvom \
-lboost_thread \
-lboost_system \
-lboost_filesystem \
@@ -51,10 +65,22 @@ VOM_LIBS = $(LIB_VOM) \
VOM_CPPFLAGS = \
-I $(WS_ROOT)/src/vpp-api/ \
+ -DBOOST_LOG_DYN_LINK \
$(CPPFLAGS)
-$(VOM_BIN): $(VOM_CPPSRC) $(VOM_BINDIR) $(LIB_VOM) $(VPP_TEST_BUILD_DIR)/vpp/vpp-api/vapi/.libs/libvapiclient.so
- $(CXX) -o $@ $(VOM_CPPFLAGS) -DBOOST_LOG_DYN_LINK -O0 -g $(VOM_CPPSRC) $(VOM_LIBS)
+$(VOM_BIN): $(VOM_CPPSRC) $(VOM_BINDIR)
+ $(CXX) -o $@ $(VOM_CPPFLAGS) -O0 -g $(VOM_CPPSRC) $(VOM_LIBS) -Wl,-rpath,$(VPP_TEST_INSTALL_PATH)/vom/lib64
+
+$(VOM_BIN).d: $(VOM_CPPSRC) $(VOM_BINDIR)
+ $(CXX) -o $@ $(VOM_CPPFLAGS) -MM -MT '$(VOM_BIN)' $(VOM_CPPSRC) > $@
+
clean:
rm -rf $(VAPI_BINDIR) $(VOM_BINDIR)
+
+ifneq ($(MAKECMDGOALS),clean)
+-include $(VAPI_CPPBIN).d
+-include $(VAPI_CBIN).d
+-include $(VOM_BIN).d
+endif
+