From 119158cda827570dc6d19cd68d5357955f74fab2 Mon Sep 17 00:00:00 2001 From: Rajarshi Chowdhury Date: Fri, 16 Apr 2021 22:09:30 -0700 Subject: [PATCH] configure: Added --disable-apps option. Together with options to disable examples, tests and unit-tests this will enable us to build SPDK without linking any executables. This is useful for packaging SPDK in applications - especially those using own ENV. Fixes #1877 Signed-off-by: Rajarshi Chowdhury Change-Id: I0467ec497d2abe2fad40cdb4ba723a240bee46d6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7462 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Reviewed-by: Aleksey Marchuk --- CONFIG | 3 +++ Makefile | 3 ++- configure | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CONFIG b/CONFIG index f464f440e..a4e76204d 100644 --- a/CONFIG +++ b/CONFIG @@ -76,6 +76,9 @@ CONFIG_UNIT_TESTS=y # Build examples CONFIG_EXAMPLES=y +# Build apps +CONFIG_APPS=y + # Build with Control-flow Enforcement Technology (CET) CONFIG_CET=n diff --git a/Makefile b/Makefile index 2bff27ae3..617e656f1 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,9 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk DIRS-y += lib DIRS-y += module DIRS-$(CONFIG_SHARED) += shared_lib -DIRS-y += app include +DIRS-y += include DIRS-$(CONFIG_EXAMPLES) += examples +DIRS-$(CONFIG_APPS) += app DIRS-y += test DIRS-$(CONFIG_IPSEC_MB) += ipsecbuild DIRS-$(CONFIG_ISAL) += isalbuild diff --git a/configure b/configure index 95162e9b8..308eda2bc 100755 --- a/configure +++ b/configure @@ -35,6 +35,7 @@ function usage() { echo " --disable-tests Disable building of functional tests" echo " --disable-unit-tests Disable building of unit tests" echo " --disable-examples Disable building of examples" + echo " --disable-apps Disable building of apps" echo "" echo "Specifying Dependencies:" echo "--with-DEPENDENCY[=path] Use the given dependency. Optionally, provide the" @@ -265,6 +266,12 @@ for i in "$@"; do --disable-examples) CONFIG[EXAMPLES]=n ;; + --enable-apps) + CONFIG[APPS]=y + ;; + --disable-apps) + CONFIG[APPS]=N + ;; --enable-werror) CONFIG[WERROR]=y ;;