test mbuf attach
[dpdk.git] / mk / rte.sdkroot.mk
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
3
4 MAKEFLAGS += --no-print-directory
5
6 # define Q to '@' or not. $(Q) is used to prefix all shell commands to
7 # be executed silently.
8 Q=@
9 ifeq '$V' '0'
10 override V=
11 endif
12 ifdef V
13 ifeq ("$(origin V)", "command line")
14 Q=
15 endif
16 endif
17 export Q
18
19 ifeq ($(RTE_SDK),)
20 $(error RTE_SDK is not defined)
21 endif
22
23 RTE_SRCDIR = $(CURDIR)
24 export RTE_SRCDIR
25
26 BUILDING_RTE_SDK := 1
27 export BUILDING_RTE_SDK
28
29 #
30 # We can specify the configuration template when doing the "make
31 # config". For instance: make config T=x86_64-native-linux-gcc
32 #
33 RTE_CONFIG_TEMPLATE :=
34 ifdef T
35 ifeq ("$(origin T)", "command line")
36 RTE_CONFIG_TEMPLATE := $(RTE_SRCDIR)/config/defconfig_$(T)
37 endif
38 endif
39 export RTE_CONFIG_TEMPLATE
40
41 #
42 # Default output is $(RTE_SRCDIR)/build
43 # output files wil go in a separate directory
44 #
45 ifdef O
46 ifeq ("$(origin O)", "command line")
47 RTE_OUTPUT := $(abspath $(O))
48 endif
49 endif
50 RTE_OUTPUT ?= $(RTE_SRCDIR)/build
51 export RTE_OUTPUT
52
53 # the directory where intermediate build files are stored, like *.o,
54 # *.d, *.cmd, ...
55 BUILDDIR = $(RTE_OUTPUT)/build
56 export BUILDDIR
57
58 export ROOTDIRS-y ROOTDIRS- ROOTDIRS-n
59
60 .PHONY: default test-build
61 default test-build: all
62
63 .PHONY: warning
64 warning:
65         @echo
66         @echo "=========================== WARNING ============================"
67         @echo "It is recommended to build DPDK using 'meson' and 'ninja'"
68         @echo "See https://doc.dpdk.org/guides/linux_gsg/build_dpdk.html"
69         @echo "Building DPDK with 'make' will be deprecated in a future release"
70         @echo "================================================================"
71         @echo
72         @test "$(MAKE_PAUSE)" = n || ( \
73         echo "This deprecation warning can be passed by adding MAKE_PAUSE=n"; \
74         echo "to 'make' command line or as an exported environment variable."; \
75         echo "Press enter to continue..."; read junk)
76
77 .PHONY: config defconfig showconfigs showversion showversionum
78 config: warning
79 config defconfig showconfigs showversion showversionum:
80         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@
81
82 .PHONY: cscope gtags tags etags
83 cscope gtags tags etags:
84         $(Q)$(RTE_SDK)/devtools/build-tags.sh $@ $T
85
86 .PHONY: test test-fast test-perf coverage test-drivers test-dump
87 test test-fast test-perf coverage test-drivers test-dump:
88         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktest.mk $@
89
90 .PHONY: install
91 install:
92         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk pre_install
93         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
94 install-%:
95         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
96
97 .PHONY: doc help
98 doc: doc-all
99 help: doc-help
100 doc-%:
101         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkdoc.mk $*
102
103 .PHONY: gcov gcovclean
104 gcov gcovclean:
105         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkgcov.mk $@
106
107 .PHONY: examples examples_clean
108 examples examples_clean:
109         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkexamples.mk $@
110
111 # all other build targets
112 %:
113         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig
114         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkroot.mk warning
115         $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk $@