1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
7 # all source are stored in SRCS-y
8 SRCS-y := main.c virtio_net.c
10 # Build using pkg-config variables if possible
11 $(shell pkg-config --exists libdpdk)
12 ifeq ($(.SHELLSTATUS),0)
14 PC_FILE := $(shell pkg-config --path libdpdk)
15 CFLAGS += $(shell pkg-config --cflags libdpdk)
16 LDFLAGS += $(shell pkg-config --libs libdpdk)
18 build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
19 $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
27 rmdir --ignore-fail-on-non-empty build
29 else # Build using legacy build system
32 $(error "Please define RTE_SDK environment variable")
35 # Default target, can be overridden by command line or environment
36 RTE_TARGET ?= x86_64-native-linuxapp-gcc
38 include $(RTE_SDK)/mk/rte.vars.mk
40 ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
41 $(info This application can only operate in a linuxapp environment, \
42 please change the definition of the RTE_TARGET environment variable)
46 CFLAGS += -O2 -D_FILE_OFFSET_BITS=64
47 CFLAGS += $(WERROR_FLAGS)
48 CFLAGS += -D_GNU_SOURCE
50 include $(RTE_SDK)/mk/rte.extapp.mk