1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
5 # directory where sources are located
8 ifeq ("$(origin S)", "command line")
9 RTE_SRCDIR
:= $(abspath
$(S
))
12 RTE_SRCDIR ?
= $(CURDIR
)
16 # Makefile to call once $(RTE_OUTPUT) is created
19 ifeq ("$(origin M)", "command line")
20 RTE_EXTMK
:= $(abspath
$(M
))
23 RTE_EXTMK ?
= $(RTE_SRCDIR
)/$(notdir $(firstword $(MAKEFILE_LIST
)))
26 # RTE_SDK_BIN must point to .config, include/ and lib/.
27 RTE_SDK_BIN
:= $(RTE_SDK
)/$(RTE_TARGET
)
28 ifeq ($(wildcard $(RTE_SDK_BIN
)/.config
),)
29 $(error Cannot find .config in
$(RTE_SDK_BIN
))
33 # Output files wil go in a separate directory: default output is
35 # Output dir can be given as command line using "O="
38 ifeq ("$(origin O)", "command line")
39 RTE_OUTPUT
:= $(abspath
$(O
))
42 RTE_OUTPUT ?
= $(RTE_SRCDIR
)/build
45 # if we are building an external application, include SDK
46 # configuration and include project configuration if any
47 include $(RTE_SDK_BIN
)/.config
48 ifneq ($(wildcard $(RTE_OUTPUT
)/.config
),)
49 include $(RTE_OUTPUT
)/.config
51 # remove double-quotes from config names
52 RTE_ARCH
:= $(CONFIG_RTE_ARCH
:"%"=%)
53 RTE_MACHINE
:= $(CONFIG_RTE_MACHINE
:"%"=%)
54 RTE_EXEC_ENV
:= $(CONFIG_RTE_EXEC_ENV
:"%"=%)
55 RTE_TOOLCHAIN
:= $(CONFIG_RTE_TOOLCHAIN
:"%"=%)