dahdi-linux: fix Module.symvers handling 615/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Sat, 20 Feb 2021 11:04:12 +0000 (12:04 +0100)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sat, 20 Feb 2021 11:09:33 +0000 (12:09 +0100)
This sets PKG_EXTMOD_SUBDIRS so kernel.mk can find the DAHDI
Module.symvers file.

Also, this puts KERNEL_MAKE_FLAGS into the make flags. This way
Module.symvers files of other modules are made available, plus there is
no need anymore to specify ARCH and CROSS_COMPILE, as KERNEL_MAKE_FLAGS
already takes care of that.

TARGET_CONFIGURE_OPTS is dropped because this seems out of place
(configure vs. compile).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libs/dahdi-linux/Makefile

index 1a6be89015cce5a4237cc4bd17c26b7fa13b7d2f..d8956da21767cb98beb4e492b533d7e15d605934 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=dahdi-linux
 PKG_VERSION:=3.1.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/dahdi-linux/releases
@@ -20,6 +20,10 @@ PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Vittorio Gambaletta <openwrt@vittgam.net>
 
+# With below variable set, $(PKG_SYMVERS_DIR)/dahdi-linux.symvers gets
+# generated from drivers/dahdi/Module.symvers.
+PKG_EXTMOD_SUBDIRS:=drivers/dahdi
+
 include $(INCLUDE_DIR)/package.mk
 
 define KernelPackage/dahdi
@@ -86,10 +90,8 @@ define Build/Prepare
 endef
 
 define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               ARCH="$(LINUX_KARCH)" \
-               $(TARGET_CONFIGURE_OPTS) \
-               CROSS_COMPILE="$(TARGET_CROSS)" \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
+               $(KERNEL_MAKE_FLAGS) \
                KSRC="$(LINUX_DIR)"
 endef