From 80ac4d2810415175c08231af7bd0912fadf58ab5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 1 Jun 2020 02:12:09 +0000 Subject: [PATCH] Use $(src) instead of $(KBUILD_EXTMOD) While $(src) is always defined, $(KBUILD_EXTMOD) is only defined when building code as an external module. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8999 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- fcst/Makefile | 2 +- fcst/Makefile_in-tree | 4 +--- iscsi-scst/kernel/isert-scst/Makefile | 2 +- qla2x00t-32gbit/qla2x00-target/Makefile | 4 ++-- qla2x00t/qla2x00-target/Makefile | 4 ++-- scst/src/Makefile | 2 +- scst_local/Makefile | 2 +- srpt/src/Makefile | 2 +- 8 files changed, 10 insertions(+), 12 deletions(-) diff --git a/fcst/Makefile b/fcst/Makefile index 03110073e..438e14e26 100644 --- a/fcst/Makefile +++ b/fcst/Makefile @@ -33,7 +33,7 @@ export CONFIG_FCST := m MODULE_NAME = fcst ifneq ($(KERNELRELEASE),) -include $(KBUILD_EXTMOD)/Makefile_in-tree +include $(src)/Makefile_in-tree else ######### BEGIN OUT-OF-TREE RULES ######### diff --git a/fcst/Makefile_in-tree b/fcst/Makefile_in-tree index a4a24738d..7b409947f 100644 --- a/fcst/Makefile_in-tree +++ b/fcst/Makefile_in-tree @@ -1,6 +1,4 @@ -ifneq ($(and $(KBUILD_EXTMOD),$(if $(findstring $(abspath $(srctree)),$(abspath $(KBUILD_EXTMOD))),,true)),) -ccflags-y += -I$(KBUILD_EXTMOD)/../scst/include -endif +ccflags-y += -I$(src)/../scst/include obj-$(CONFIG_FCST) += fcst.o diff --git a/iscsi-scst/kernel/isert-scst/Makefile b/iscsi-scst/kernel/isert-scst/Makefile index 3808f19d3..fd82fcd5c 100644 --- a/iscsi-scst/kernel/isert-scst/Makefile +++ b/iscsi-scst/kernel/isert-scst/Makefile @@ -21,7 +21,7 @@ # Note 2! The CFLAGS definitions are now in the main makefile. LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE) -ccflags-y += -I$(src)/../../include -I$(KBUILD_EXTMOD)/../../../scst/include +ccflags-y += -I$(src)/../../include -I$(src)/../../../scst/include ccflags-y += $(call cc-option,-Wextra) \ $(call cc-option,-Wno-old-style-declaration) \ -Wno-unused-parameter -Wno-missing-field-initializers diff --git a/qla2x00t-32gbit/qla2x00-target/Makefile b/qla2x00t-32gbit/qla2x00-target/Makefile index d37f183fe..b8c7bb212 100644 --- a/qla2x00t-32gbit/qla2x00-target/Makefile +++ b/qla2x00t-32gbit/qla2x00-target/Makefile @@ -54,13 +54,13 @@ endif ifeq ($(BUILD_2X_MODULE),) QLA2XXX_INC_DIR := $(KDIR)/drivers/scsi/qla2xxx else -QLA2XXX_INC_DIR := $(KBUILD_EXTMOD)/.. +QLA2XXX_INC_DIR := $(src)/.. QLA2XXX_DIR := $(shell pwd)/.. QLA2XXX_SCST := qla2xxx_scst endif ifneq ($(PATCHLEVEL),) -ccflags-y += -I$(KBUILD_EXTMOD)/../../scst/include +ccflags-y += -I$(src)/../../scst/include ccflags-y += -W -Wno-unused-parameter -Wno-missing-field-initializers #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR diff --git a/qla2x00t/qla2x00-target/Makefile b/qla2x00t/qla2x00-target/Makefile index 5e66826f5..1facebac4 100644 --- a/qla2x00t/qla2x00-target/Makefile +++ b/qla2x00t/qla2x00-target/Makefile @@ -53,13 +53,13 @@ endif ifeq ($(BUILD_2X_MODULE),) QLA2XXX_INC_DIR := $(KDIR)/drivers/scsi/qla2xxx else -QLA2XXX_INC_DIR := $(KBUILD_EXTMOD)/.. +QLA2XXX_INC_DIR := $(src)/.. QLA2XXX_DIR := $(shell pwd)/.. QLA2XXX_SCST := qla2xxx_scst endif ifneq ($(PATCHLEVEL),) -ccflags-y += -I$(KBUILD_EXTMOD)/../../scst/include +ccflags-y += -I$(src)/../../scst/include ccflags-y += -W -Wno-unused-parameter -Wno-missing-field-initializers #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD #ccflags-y += -DCONFIG_QLA_TGT_DEBUG_SRR diff --git a/scst/src/Makefile b/scst/src/Makefile index 81eda0050..86e7e5739 100644 --- a/scst/src/Makefile +++ b/scst/src/Makefile @@ -38,7 +38,7 @@ DEV_HANDLERS_DIR = dev_handlers ifneq ($(PATCHLEVEL),) # See also Documentation/core-api/symbol-namespaces.rst for more information # about DEFAULT_SYMBOL_NAMESPACE. -ccflags-y += -I$(KBUILD_EXTMOD)/../include $(call cc-option,-Wextra) \ +ccflags-y += -I$(src)/../include $(call cc-option,-Wextra) \ -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare\ -DDEFAULT_SYMBOL_NAMESPACE=SCST\ $(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM) diff --git a/scst_local/Makefile b/scst_local/Makefile index 566c78df1..9d54ab5f2 100644 --- a/scst_local/Makefile +++ b/scst_local/Makefile @@ -7,7 +7,7 @@ SHELL=/bin/bash KMOD := $(shell pwd)/kernel ifneq ($(PATCHLEVEL),) -ccflags-y += -I$(KBUILD_EXTMOD)/../scst/include +ccflags-y += -I$(src)/../scst/include ccflags-y += $(call cc-option,-Wextra) -Wno-unused-parameter\ -Wno-missing-field-initializers diff --git a/srpt/src/Makefile b/srpt/src/Makefile index 519f47cb7..c38767d9f 100644 --- a/srpt/src/Makefile +++ b/srpt/src/Makefile @@ -1,6 +1,6 @@ LINUXINCLUDE := $(PRE_CFLAGS) $(LINUXINCLUDE) CPPFLAGS := $(PRE_CFLAGS) $(CPPFLAGS) -ccflags-y += -I$(KBUILD_EXTMOD)/../../scst/include +ccflags-y += -I$(src)/../../scst/include #ccflags-y += -Wextra -Wno-unused-parameter