[UDP_Replay] adding Makefile for dynamic arp
[samplevnf.git] / VNFs / UDP_Replay / Makefile
1 # Copyright (c) 2017 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http:#www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 ifeq ($(RTE_SDK),)
16 $(error "Please define RTE_SDK environment variable")
17 endif
18
19 # Default target, can be overriden by command line or environment
20 RTE_TARGET ?= x86_64-native-linuxapp-gcc
21 DIRS-y += pipeline
22
23 include $(RTE_SDK)/mk/rte.vars.mk
24
25 # binary name
26 APP = UDP_Replay
27
28 VPATH += $(VNF_CORE)/common/vnf_common
29 VPATH += $(VNF_CORE)/common/VIL/pipeline_arpicmp
30 VPATH += $(VNF_CORE)/common/VIL/conntrack
31 VPATH += $(VNF_CORE)/common/VIL/pipeline_common
32 VPATH += $(VNF_CORE)/common/VIL/pipeline_loadb
33 VPATH += $(VNF_CORE)/common/VIL/pipeline_master
34 VPATH += $(VNF_CORE)/common/VIL/pipeline_passthrough
35 VPATH += $(SRCDIR)/pipeline
36 VPATH += $(VNF_CORE)/common/VIL/pipeline_txrx
37 VPATH += $(VNF_CORE)/common/VIL/l2l3_stack
38
39 INC += $(wildcard *.h)
40 INC += $(wildcard pipeline/*.h)
41 INC += $(wildcard $(VNF_CORE)/common/vnf_common/*.h)
42 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_arpicmp/*.h)
43 INC += $(wildcard $(VNF_CORE)/common/VIL/conntrack/*.h)
44 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_loadb/*.h)
45 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_common/*.h)
46 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_master/*.h)
47 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_passthrough/*.h)
48 INC += $(wildcard $(VNF_CORE)/common/VIL/pipeline_txrx/*.h)
49 INC += $(wildcard $(VNF_CORE)/common/VIL/l2l3_stack/*.h)
50
51 CFLAGS += -I$(SRCDIR) -mrtm -mhle -I$(SRCDIR)/pipeline -I$(VNF_CORE)/common/vnf_common
52 CFLAGS += -I$(VNF_CORE)/common/VIL/conntrack -I$(VNF_CORE)/common/VIL/l2l3_stack
53 CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_common -I$(VNF_CORE)/common/VIL/pipeline_loadb
54 CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_master -I$(VNF_CORE)/common/VIL/pipeline_passthrough
55 CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_txrx
56 CFLAGS += -I$(VNF_CORE)/common/VIL/pipeline_arpicmp
57
58 # all source are stored in SRCS-y
59 SRCS-y := main.c
60 SRCS-y += parse_obj_list.c
61 SRCS-y += config_parse.c
62 SRCS-y += config_parse_tm.c
63 SRCS-y += config_check.c
64
65 SRCS-y += lib_arp.c
66 SRCS-y += lib_icmpv6.c
67 SRCS-y += interface.c
68 SRCS-y += hle.c
69 SRCS-y += tsx.c
70 SRCS-y += l2_proto.c
71 SRCS-y += l3fwd_main.c
72 SRCS-y += l3fwd_lpm4.c
73 SRCS-y += l3fwd_lpm6.c
74 SRCS-y += bond.c
75
76 SRCS-y += pipeline_common_be.c
77 SRCS-y += pipeline_common_fe.c
78 SRCS-y += pipeline_master_be.c
79 SRCS-y += pipeline_master.c
80 SRCS-y += pipeline_passthrough_be.c
81 SRCS-y += pipeline_passthrough.c
82 SRCS-y += pipeline_arpicmp.c
83 SRCS-y += pipeline_loadb.c
84 SRCS-y += pipeline_loadb_be.c
85 SRCS-y += vnf_common.c
86 SRCS-y += pipeline_arpicmp_be.c
87
88 CFLAGS += -O3 $(USER_FLAGS)
89 CFLAGS += $(WERROR_FLAGS)
90
91 # workaround for a gcc bug with noreturn attribute
92 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
93 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
94 CFLAGS_main.o += -Wno-return-type
95 endif
96
97 include $(RTE_SDK)/mk/rte.extapp.mk