1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
8 # all source are stored in SRCS-y
11 # Build using pkg-config variables if possible
12 $(shell pkg-config --exists libdpdk)
13 ifeq ($(.SHELLSTATUS),0)
15 PC_FILE := $(shell pkg-config --path libdpdk)
16 CFLAGS += $(shell pkg-config --cflags libdpdk)
17 LDFLAGS += $(shell pkg-config --libs libdpdk)
19 build/$(APP): $(SRCS-y) Makefile $(PC_FILE) | build
20 $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)
28 rmdir --ignore-fail-on-non-empty build
33 $(error "Please define RTE_SDK environment variable")
36 # Default target, can be overridden by command line or environment
37 RTE_TARGET ?= x86_64-native-linuxapp-gcc
39 include $(RTE_SDK)/mk/rte.vars.mk
42 CFLAGS += $(WERROR_FLAGS)
44 # workaround for a gcc bug with noreturn attribute
45 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
46 ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
47 CFLAGS_main.o += -Wno-return-type
50 include $(RTE_SDK)/mk/rte.extapp.mk