1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
7 # all source are stored in SRCS-y
9 SRCS-y += config_parse.c
11 SRCS-y += config_parse_tm.c
12 SRCS-y += config_check.c
16 SRCS-y += cpu_core_map.c
18 SRCS-y += pipeline_common_be.c
19 SRCS-y += pipeline_common_fe.c
20 SRCS-y += pipeline_master_be.c
21 SRCS-y += pipeline_master.c
22 SRCS-y += pipeline_passthrough_be.c
23 SRCS-y += pipeline_passthrough.c
24 SRCS-y += pipeline_firewall_be.c
25 SRCS-y += pipeline_firewall.c
26 SRCS-y += pipeline_flow_classification_be.c
27 SRCS-y += pipeline_flow_classification.c
28 SRCS-y += pipeline_flow_actions_be.c
29 SRCS-y += pipeline_flow_actions.c
30 SRCS-y += pipeline_routing_be.c
31 SRCS-y += pipeline_routing.c
33 # Build using pkg-config variables if possible
34 $(shell pkg-config --exists libdpdk)
35 ifeq ($(.SHELLSTATUS),0)
37 PC_FILE := $(shell pkg-config --path libdpdk)
38 CFLAGS += $(shell pkg-config --cflags libdpdk)
39 LDFLAGS += $(shell pkg-config --libs libdpdk)
42 CFLAGS += -I. -I./pipeline/
44 OBJS := $(patsubst %.c,build/%.o,$(SRCS-y))
46 build/%.o: %.c Makefile $(PC_FILE) | build
47 $(CC) $(CFLAGS) -c $< -o $@
50 $(CC) $(OBJS) -o $@ $(LDFLAGS)
57 rm -f build/$(APP) build/*.o
58 rmdir --ignore-fail-on-non-empty build
63 $(error "Please define RTE_SDK environment variable")
66 VPATH += $(SRCDIR)/pipeline
68 # Default target, can be overridden by command line or environment
69 RTE_TARGET ?= x86_64-native-linuxapp-gcc
71 include $(RTE_SDK)/mk/rte.vars.mk
73 INC += $(sort $(wildcard *.h)) $(sort $(wildcard pipeline/*.h))
75 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := $(SRCS-y)
77 CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/pipeline
79 CFLAGS += $(WERROR_FLAGS) -Wno-error=unused-function -Wno-error=unused-variable
81 include $(RTE_SDK)/mk/rte.extapp.mk