wireless: prefix header search paths with $(srctree)/
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 25 Jan 2019 15:18:00 +0000 (00:18 +0900)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 1 Feb 2019 12:42:25 +0000 (14:42 +0200)
Currently, the Kbuild core manipulates header search paths in a crazy
way [1].

To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
the search paths in the srctree. Some Makefiles are already written in
that way, but not all. The goal of this work is to make the notation
consistent, and finally get rid of the gross hacks.

Having whitespaces after -I does not matter since commit 48f6e3cf5bc6
("kbuild: do not drop -I without parameter").

I also removed one header search path in:

  drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile

I was able to compile without it.

[1]: https://patchwork.kernel.org/patch/9632347/

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/Makefile
drivers/net/wireless/broadcom/brcm80211/brcmsmac/Makefile
drivers/net/wireless/broadcom/brcm80211/brcmutil/Makefile
drivers/net/wireless/intel/iwlwifi/dvm/Makefile
drivers/net/wireless/intel/iwlwifi/mvm/Makefile
drivers/net/wireless/realtek/rtl818x/rtl8180/Makefile
drivers/net/wireless/realtek/rtl818x/rtl8187/Makefile

index 22fd95a736a806ed1497185410352cd2f04235a0..f7cf3e5f48491f919da543aaf5d275717f46a21a 100644 (file)
@@ -16,8 +16,8 @@
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ccflags-y += \
-       -Idrivers/net/wireless/broadcom/brcm80211/brcmfmac      \
-       -Idrivers/net/wireless/broadcom/brcm80211/include
+       -I $(srctree)/$(src) \
+       -I $(srctree)/$(src)/../include
 
 obj-$(CONFIG_BRCMFMAC) += brcmfmac.o
 brcmfmac-objs += \
index ed83f33aceb734530e53ce266ae1dd6476cc1d7e..482d7737764da76c4ae253641f0d30408dbe28ec 100644 (file)
@@ -16,9 +16,9 @@
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ccflags-y := \
-       -Idrivers/net/wireless/broadcom/brcm80211/brcmsmac \
-       -Idrivers/net/wireless/broadcom/brcm80211/brcmsmac/phy \
-       -Idrivers/net/wireless/broadcom/brcm80211/include
+       -I $(srctree)/$(src) \
+       -I $(srctree)/$(src)/phy \
+       -I $(srctree)/$(src)/../include
 
 brcmsmac-y := \
        mac80211_if.o \
index 256c91f9ac4b74554a28f49a2ee73e9a2ac4b6cb..bb02c6220a88c9daeafd154ed1a8967d8ca7bbc6 100644 (file)
@@ -15,9 +15,7 @@
 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-ccflags-y :=                           \
-       -Idrivers/net/wireless/broadcom/brcm80211/brcmutil \
-       -Idrivers/net/wireless/broadcom/brcm80211/include
+ccflags-y := -I $(srctree)/$(src)/../include
 
 obj-$(CONFIG_BRCMUTIL) += brcmutil.o
 brcmutil-objs  = utils.o d11.o
index 702d42b2d4525b540f8a38618a63a68be15ffb17..0486b17d7c41f4f41ce15e5693a4846838156908 100644 (file)
@@ -11,4 +11,4 @@ iwldvm-objs           += rxon.o devices.o
 iwldvm-$(CONFIG_IWLWIFI_LEDS) += led.o
 iwldvm-$(CONFIG_IWLWIFI_DEBUGFS) += debugfs.o
 
-ccflags-y += -I$(src)/../
+ccflags-y += -I $(srctree)/$(src)/../
index 87373b099fd9f9a4dda8f57c6f5e485b406ebc6f..30cbd981efbd89fa81436dcd4e3facf530dd5ab5 100644 (file)
@@ -9,4 +9,4 @@ iwlmvm-$(CONFIG_IWLWIFI_DEBUGFS) += debugfs.o debugfs-vif.o
 iwlmvm-$(CONFIG_IWLWIFI_LEDS) += led.o
 iwlmvm-$(CONFIG_PM) += d3.o
 
-ccflags-y += -I$(src)/../
+ccflags-y += -I $(srctree)/$(src)/../
index 2966681efaef41845209d1b0bc055a0521da2368..5d6b06d3c02c8a363976a19ab53e8310e01f0d45 100644 (file)
@@ -2,4 +2,4 @@ rtl818x_pci-objs        := dev.o rtl8225.o sa2400.o max2820.o grf5101.o rtl8225se.o
 
 obj-$(CONFIG_RTL8180)  += rtl818x_pci.o
 
-ccflags-y += -Idrivers/net/wireless/realtek/rtl818x
+ccflags-y += -I $(srctree)/$(src)/..
index ff074912a095215255af28c9810e658bc45c9bfe..95bac73ece7cf3fe37a87b425fd5103e9ffa41f7 100644 (file)
@@ -2,4 +2,4 @@ rtl8187-objs            := dev.o rtl8225.o leds.o rfkill.o
 
 obj-$(CONFIG_RTL8187)  += rtl8187.o
 
-ccflags-y += -Idrivers/net/wireless/realtek/rtl818x
+ccflags-y += -I $(srctree)/$(src)/..