2017-12-19 15:49:04 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2010-2015 Intel Corporation
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# include rte.vars.mk if config file exists
|
|
|
|
#
|
|
|
|
ifeq (,$(wildcard $(RTE_OUTPUT)/.config))
|
|
|
|
$(error "need a make config first")
|
|
|
|
else
|
|
|
|
include $(RTE_SDK)/mk/rte.vars.mk
|
|
|
|
endif
|
|
|
|
|
2017-06-06 12:58:36 +00:00
|
|
|
# allow exec-env specific targets
|
|
|
|
-include $(RTE_SDK)/mk/exec-env/$(RTE_EXEC_ENV)/rte.custom.mk
|
|
|
|
|
2017-03-24 13:21:31 +00:00
|
|
|
buildtools: | lib
|
2018-03-29 15:28:26 +00:00
|
|
|
kernel: | lib
|
2017-03-24 13:21:31 +00:00
|
|
|
drivers: | lib buildtools
|
|
|
|
app: | lib buildtools drivers
|
|
|
|
test: | lib buildtools drivers
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# build and clean targets
|
|
|
|
#
|
|
|
|
|
|
|
|
CLEANDIRS = $(addsuffix _clean,$(ROOTDIRS-y) $(ROOTDIRS-n) $(ROOTDIRS-))
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: $(ROOTDIRS-y)
|
2015-07-02 10:35:37 +00:00
|
|
|
@echo "Build complete [$(RTE_TARGET)]"
|
2020-04-27 14:25:20 +00:00
|
|
|
@echo "==== NOTE ===="
|
|
|
|
@echo "It is recommended to build DPDK using 'meson' and 'ninja'"
|
|
|
|
@echo "See https://doc.dpdk.org/guides/linux_gsg/build_dpdk.html for instructions"
|
|
|
|
@echo "Building DPDK with 'make' will be deprecated in a future release"
|
|
|
|
@echo "=============="
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean: $(CLEANDIRS)
|
|
|
|
@rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
|
2016-07-07 11:49:58 +00:00
|
|
|
$(RTE_OUTPUT)/lib \
|
|
|
|
$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod
|
2012-09-04 12:54:00 +00:00
|
|
|
@[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include
|
2016-12-15 21:46:47 +00:00
|
|
|
@$(RTE_SDK)/buildtools/gen-config-h.sh $(RTE_OUTPUT)/.config \
|
2012-09-04 12:54:00 +00:00
|
|
|
> $(RTE_OUTPUT)/include/rte_config.h
|
2014-02-10 11:49:10 +00:00
|
|
|
$(Q)$(MAKE) -f $(RTE_SDK)/GNUmakefile gcovclean
|
2012-09-04 12:54:00 +00:00
|
|
|
@echo Clean complete
|
|
|
|
|
|
|
|
.SECONDEXPANSION:
|
2017-02-16 14:57:43 +00:00
|
|
|
.PHONY: $(ROOTDIRS-y) $(ROOTDIRS-)
|
|
|
|
$(ROOTDIRS-y) $(ROOTDIRS-):
|
2012-09-04 12:54:00 +00:00
|
|
|
@[ -d $(BUILDDIR)/$@ ] || mkdir -p $(BUILDDIR)/$@
|
|
|
|
@echo "== Build $@"
|
|
|
|
$(Q)$(MAKE) S=$@ -f $(RTE_SRCDIR)/$@/Makefile -C $(BUILDDIR)/$@ all
|
2015-11-24 14:31:17 +00:00
|
|
|
@if [ $@ = drivers ]; then \
|
|
|
|
$(MAKE) -f $(RTE_SDK)/mk/rte.combinedlib.mk; \
|
2013-09-18 10:00:00 +00:00
|
|
|
fi
|
2012-09-04 12:54:00 +00:00
|
|
|
|
|
|
|
%_clean:
|
|
|
|
@echo "== Clean $*"
|
|
|
|
$(Q)if [ -f $(RTE_SRCDIR)/$*/Makefile -a -d $(BUILDDIR)/$* ]; then \
|
|
|
|
$(MAKE) S=$* -f $(RTE_SRCDIR)/$*/Makefile -C $(BUILDDIR)/$* clean ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
RTE_MAKE_SUBTARGET ?= all
|
|
|
|
|
2017-03-24 13:21:31 +00:00
|
|
|
%_sub: $(addsuffix _sub,$(*))
|
|
|
|
@echo $(addsuffix _sub,$(*))
|
2012-09-04 12:54:00 +00:00
|
|
|
@[ -d $(BUILDDIR)/$* ] || mkdir -p $(BUILDDIR)/$*
|
|
|
|
@echo "== Build $*"
|
|
|
|
$(Q)$(MAKE) S=$* -f $(RTE_SRCDIR)/$*/Makefile -C $(BUILDDIR)/$* \
|
|
|
|
$(RTE_MAKE_SUBTARGET)
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: build
|
|
|
|
|
|
|
|
.PHONY: FORCE
|
|
|
|
FORCE:
|