X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=mk%2Frte.sdkconfig.mk;h=59cf6b19b0c35391b02a7f08319ade123e35caaa;hb=330eb93b6f0e1baa1c8f406f0048b58fd5329233;hp=5c94edf8342a570d912dc80c18a28954f765c6fd;hpb=7b53c036e6bf56623b8273018ff1c8cc62847857;p=deb_dpdk.git diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index 5c94edf8..59cf6b19 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -60,17 +60,47 @@ showconfigs: .PHONY: notemplate notemplate: - @printf "No template specified. " - @echo "Use T=template among the following list:" + @printf "No template specified. Use 'make defconfig' or " + @echo "use T=template from the following list:" @$(MAKE) -rR showconfigs | sed 's,^, ,' +.PHONY: defconfig +defconfig: + @$(MAKE) config T=$(shell \ + uname -m | awk '{ \ + if ($$0 == "aarch64") { \ + print "arm64-armv8a"} \ + else if ($$0 == "armv7l") { \ + print "arm-armv7a"} \ + else if ($$0 == "ppc64") { \ + print "ppc_64-power8"} \ + else if ($$0 == "amd64") { \ + print "x86_64-native"} \ + else { \ + printf "%s-native", $$0} }' \ + )-$(shell \ + uname | awk '{ \ + if ($$0 == "Linux") { \ + print "linuxapp"} \ + else { \ + print "bsdapp"} }' \ + )-$(shell \ + ${CC} --version | grep -o 'cc\|gcc\|icc\|clang' | awk \ + '{ \ + if ($$1 == "cc") { \ + print "gcc" } \ + else { \ + print $$1 } \ + }' \ + ) + .PHONY: config ifeq ($(RTE_CONFIG_TEMPLATE),) config: notemplate else config: $(RTE_OUTPUT)/include/rte_config.h $(RTE_OUTPUT)/Makefile - $(Q)$(MAKE) depdirs - @echo "Configuration done" + @echo "Configuration done using" \ + $(patsubst defconfig_%,%,$(notdir $(RTE_CONFIG_TEMPLATE))) endif $(RTE_OUTPUT): @@ -107,12 +137,12 @@ endif # generate a Makefile for this build directory # use a relative path so it will continue to work even if we move the directory -SDK_RELPATH=$(shell $(RTE_SDK)/scripts/relpath.sh $(abspath $(RTE_SRCDIR)) \ +SDK_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_SRCDIR)) \ $(abspath $(RTE_OUTPUT))) -OUTPUT_RELPATH=$(shell $(RTE_SDK)/scripts/relpath.sh $(abspath $(RTE_OUTPUT)) \ +OUTPUT_RELPATH=$(shell $(RTE_SDK)/buildtools/relpath.sh $(abspath $(RTE_OUTPUT)) \ $(abspath $(RTE_SRCDIR))) $(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT) - $(Q)$(RTE_SDK)/scripts/gen-build-mk.sh $(SDK_RELPATH) $(OUTPUT_RELPATH) \ + $(Q)$(RTE_SDK)/buildtools/gen-build-mk.sh $(SDK_RELPATH) $(OUTPUT_RELPATH) \ > $(RTE_OUTPUT)/Makefile # clean installed files, and generate a new config header file @@ -122,7 +152,7 @@ $(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config $(RTE_OUTPUT)/lib \ $(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build $(Q)mkdir -p $(RTE_OUTPUT)/include - $(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \ + $(Q)$(RTE_SDK)/buildtools/gen-config-h.sh $(RTE_OUTPUT)/.config \ > $(RTE_OUTPUT)/include/rte_config.h # generate the rte_config.h @@ -140,7 +170,6 @@ checkconfig: fi $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk \ headerconfig NODOTCONF=1 - $(Q)$(MAKE) -s depdirs .PHONY: FORCE FORCE: