1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
4 MAKEFLAGS += --no-print-directory
6 # define Q to '@' or not. $(Q) is used to prefix all shell commands to
7 # be executed silently.
13 ifeq ("$(origin V)", "command line")
20 $(error RTE_SDK is not defined)
23 RTE_SRCDIR = $(CURDIR)
27 export BUILDING_RTE_SDK
30 # We can specify the configuration template when doing the "make
31 # config". For instance: make config T=x86_64-native-linux-gcc
33 RTE_CONFIG_TEMPLATE :=
35 ifeq ("$(origin T)", "command line")
36 RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(T)
39 export RTE_CONFIG_TEMPLATE
42 # Default output is $(RTE_SRCDIR)/build
43 # output files wil go in a separate directory
46 ifeq ("$(origin O)", "command line")
47 RTE_OUTPUT := $(abspath $(O))
50 RTE_OUTPUT ?= $(RTE_SRCDIR)/build
53 # the directory where intermediate build files are stored, like *.o,
55 BUILDDIR = $(RTE_OUTPUT)/build
58 export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n
60 .PHONY: default test-build
61 default test-build: all
63 .PHONY: config defconfig showconfigs showversion showversionum
64 config defconfig showconfigs showversion showversionum:
65 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@
67 .PHONY: cscope gtags tags etags
68 cscope gtags tags etags:
69 $(Q)$(RTE_SDK)/devtools/build-tags.sh $@ $T
71 .PHONY: test test-fast test-perf coverage test-drivers test-dump
72 test test-fast test-perf coverage test-drivers test-dump:
73 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktest.mk $@
77 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk pre_install
78 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
80 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
86 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkdoc.mk $*
88 .PHONY: gcov gcovclean
90 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkgcov.mk $@
92 .PHONY: examples examples_clean
93 examples examples_clean:
94 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkexamples.mk $@
96 # all other build targets
98 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig
99 $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk $@