1 # Copyright (c) 2016 Intel Corporation.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
15 $(error "Please define RTE_SDK environment variable")
20 @echo "GTEST_DIR is not setup properly. Skipping gtest"
23 @echo "GTEST_DIR is not setup properly. Skipping gtest"
27 # Default target, can be overridden by command line or environment
28 RTE_TARGET ?= x86_64-native-linuxapp-gcc
30 include $(RTE_SDK)/mk/rte.vars.mk
34 # we must create the output dir first and recall the same Makefile
36 ifeq ($(NOT_FIRST_CALL),)
42 BDIR := $(RTE_OUTPUT)/build/$(CUR_SUBDIR)
46 $(Q)$(MAKE) -C $(BDIR) -f $(RTE_EXTMK) \
47 S=$(RTE_SRCDIR) O=$(RTE_OUTPUT) SRCDIR=$(RTE_SRCDIR) X=obj
48 $(Q)$(MAKE) -C $(BDIR) -f $(RTE_EXTMK) \
49 S=$(RTE_SRCDIR) O=$(RTE_OUTPUT) SRCDIR=$(RTE_SRCDIR) X=app
53 $(Q)$(MAKE) -C $(BDIR) -f $(RTE_EXTMK) $@ \
54 S=$(RTE_SRCDIR) O=$(RTE_OUTPUT) SRCDIR=$(RTE_SRCDIR) X=obj
55 $(Q)$(MAKE) -C $(BDIR) -f $(RTE_EXTMK) $@ \
56 S=$(RTE_SRCDIR) O=$(RTE_OUTPUT) SRCDIR=$(RTE_SRCDIR) X=app
64 include $(TLDK_ROOT)/mk/tle.cpp-vars.mk
69 # all source are stored in SRCS-y
71 SRCS-y += test_common.cpp
72 SRCS-y += test_tle_dring.cpp
73 SRCS-y += test_tle_ctx.cpp
74 #SRCS-y += test_tle_udp_dev.cpp
75 SRCS-y += test_tle_udp_destroy.cpp
76 SRCS-y += test_tle_udp_event.cpp
77 #SRCS-y += test_tle_udp_stream.cpp
78 SRCS-y += test_tle_udp_stream_gen.cpp
79 #SRCS-y += test_tle_tcp_stream.cpp
80 #SRCS-y += test_tle_tcp_stream_gen.cpp
82 SYMLINK-y-app += test_scapy_gen.py
84 CXXFLAGS += -std=c++11
86 ifeq ($(shell test $(GCC_VERSION) -lt 50 && echo 1), 1)
87 CXXFLAGS += -D __STDC_FORMAT_MACROS
90 CXXFLAGS += -I$(GTEST_DIR)/include
91 CXXFLAGS += -I$(GMOCK_DIR)/include
92 CXXFLAGS += -I$(RTE_OUTPUT)/include
95 LDFLAGS += -L$(GMOCK_DIR) -lgmock
96 LDLIBS += -whole-archive -ltle_l4p -ltle_dring
98 include $(TLDK_ROOT)/mk/tle.cpp-obj.mk
110 # all source are stored in SRCS-y
114 ifeq ($(shell test $(GCC_VERSION) -lt 50 && echo 1), 1)
115 CFLAGS += -D __STDC_FORMAT_MACROS
118 CFLAGS += $(WERROR_FLAGS)
120 LDLIBS += gtest-rfc.o
123 LDLIBS += -L$(GMOCK_DIR) -lgmock
124 LDLIBS += -L$(RTE_OUTPUT)/lib
125 LDLIBS += -whole-archive -ltle_l4p -ltle_dring -ltle_timer
127 include $(TLDK_ROOT)/mk/tle.app.mk