]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
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 | |
9f95a23c | 31 | # config". For instance: make config T=x86_64-native-linux-gcc |
11fdf7f2 TL |
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 | ||
9f95a23c TL |
60 | .PHONY: default test-build |
61 | default test-build: all | |
11fdf7f2 TL |
62 | |
63 | .PHONY: config defconfig showconfigs showversion showversionum | |
64 | config defconfig showconfigs showversion showversionum: | |
65 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk $@ | |
66 | ||
67 | .PHONY: cscope gtags tags etags | |
68 | cscope gtags tags etags: | |
69 | $(Q)$(RTE_SDK)/devtools/build-tags.sh $@ $T | |
70 | ||
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 $@ | |
74 | ||
11fdf7f2 TL |
75 | .PHONY: install |
76 | install: | |
77 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk pre_install | |
78 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@ | |
79 | install-%: | |
80 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@ | |
81 | ||
82 | .PHONY: doc help | |
83 | doc: doc-all | |
84 | help: doc-help | |
85 | doc-%: | |
86 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkdoc.mk $* | |
87 | ||
88 | .PHONY: gcov gcovclean | |
89 | gcov gcovclean: | |
90 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkgcov.mk $@ | |
91 | ||
92 | .PHONY: examples examples_clean | |
93 | examples examples_clean: | |
94 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkexamples.mk $@ | |
95 | ||
96 | # all other build targets | |
97 | %: | |
98 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk checkconfig | |
99 | $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkbuild.mk $@ |