build: use KERNEL_MAKE_FLAGS for kernel file compilations
[openwrt/openwrt.git] / package / kernel / ath10k-ct / Makefile
index a894773b73e432b5d5acb6a45e864de49218a1b8..82d7664b76e1fd143b2e7373bb05a3fddb64ae2b 100644 (file)
@@ -14,6 +14,7 @@ PKG_MIRROR_HASH:=616174650e12a82edb6b6bd18ac186e2c6a48fdad0082df9d2011ab20940814
 
 PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
 PKG_BUILD_PARALLEL:=1
+PKG_EXTMOD_SUBDIRS:=ath10k
 
 # Build the 4.13 ath10k-ct driver version.  Other options are "-4.9", or
 # leave un-defined for 4.7 kernel.  Probably this should match as closely as
@@ -32,7 +33,7 @@ define KernelPackage/ath10k-ct
   FILES:=\
        $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \
        $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
-  AUTOLOAD:=$(call AutoLoad,50,mac80211 ath ath10k_core ath10k_pci)
+  AUTOLOAD:=$(call AutoProbe,ath10k_pci)
 endef
 
 NOSTDINC_FLAGS = \
@@ -78,8 +79,7 @@ endif
 
 define Build/Compile
        +$(MAKE) $(CT_MAKEDEFS) $(PKG_JOBS) -C "$(LINUX_DIR)" \
-               ARCH="$(LINUX_KARCH)" \
-               CROSS_COMPILE="$(TARGET_CROSS)" \
+               $(KERNEL_MAKE_FLAGS) \
                SUBDIRS="$(PKG_BUILD_DIR)/ath10k$(CT_KVER)" \
                NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
                modules