Browse Source

- add $(KERNEL_MODULE_BUILD_CMDS_DEFAULT)

master
vanhofen 2 years ago
parent
commit
00b267525d
  1. 10
      package/pkg-kernel-module.mk
  2. 8
      package/pkg-utils.mk

10
package/pkg-kernel-module.mk

@ -17,14 +17,20 @@ KERNEL_MAKE_VARS += \
KVER=$(KERNEL_VERSION) \ KVER=$(KERNEL_VERSION) \
KSRC=$(BUILD_DIR)/$(KERNEL_DIR) KSRC=$(BUILD_DIR)/$(KERNEL_DIR)
define KERNEL_MODULE_BUILD define KERNEL_MODULE_BUILD_CMDS_DEFAULT
@$(call MESSAGE,"Building kernel module")
$(CHDIR)/$($(PKG)_DIR); \ $(CHDIR)/$($(PKG)_DIR); \
$(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) \ $(TARGET_MAKE_ENV) $($(PKG)_MAKE_ENV) \
$($(PKG)_MAKE) \ $($(PKG)_MAKE) \
$($(PKG)_MAKE_OPTS) $(KERNEL_MAKE_VARS) $($(PKG)_MAKE_OPTS) $(KERNEL_MAKE_VARS)
endef endef
define KERNEL_MODULE_BUILD
@$(call MESSAGE,"Building kernel module")
$(foreach hook,$($(PKG)_PRE_BUILD_HOOKS),$(call $(hook))$(sep))
$(Q)$(call $(PKG)_BUILD_CMDS)
$(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))
endef
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
define kernel-module define kernel-module

8
package/pkg-utils.mk

@ -97,7 +97,7 @@ ifndef $(PKG)_MAKE_OPTS
endif endif
# build commands # build commands
# TODO: python, kernel # TODO: python
ifndef $(PKG)_BUILD_CMDS ifndef $(PKG)_BUILD_CMDS
ifeq ($(PKG_MODE),$(filter $(PKG_MODE),AUTOTOOLS CMAKE GENERIC KCONFIG)) ifeq ($(PKG_MODE),$(filter $(PKG_MODE),AUTOTOOLS CMAKE GENERIC KCONFIG))
ifeq ($(PKG_HOST_PACKAGE),YES) ifeq ($(PKG_HOST_PACKAGE),YES)
@ -105,12 +105,14 @@ ifndef $(PKG)_BUILD_CMDS
else else
$(PKG)_BUILD_CMDS = $$(TARGET_MAKE_BUILD_CMDS_DEFAULT) $(PKG)_BUILD_CMDS = $$(TARGET_MAKE_BUILD_CMDS_DEFAULT)
endif endif
else ifeq ($(PKG_MODE),$(filter $(PKG_MODE),MESON)) else ifeq ($(PKG_MODE),MESON)
ifeq ($(PKG_HOST_PACKAGE),YES) ifeq ($(PKG_HOST_PACKAGE),YES)
$(PKG)_BUILD_CMDS = $$(HOST_NINJA_BUILD_CMDS_DEFAULT) $(PKG)_BUILD_CMDS = $$(HOST_NINJA_BUILD_CMDS_DEFAULT)
else else
$(PKG)_BUILD_CMDS = $$(TARGET_NINJA_BUILD_CMDS_DEFAULT) $(PKG)_BUILD_CMDS = $$(TARGET_NINJA_BUILD_CMDS_DEFAULT)
endif endif
else ifeq ($(PKG_MODE),KERNEL)
$(PKG)_BUILD_CMDS = $$(KERNEL_MODULE_BUILD_CMDS_DEFAULT)
else else
$(PKG)_BUILD_CMDS = echo "$(PKG_NO_BUILD)" $(PKG)_BUILD_CMDS = echo "$(PKG_NO_BUILD)"
endif endif
@ -139,7 +141,7 @@ ifndef $(PKG)_INSTALL_CMDS
else else
$(PKG)_INSTALL_CMDS = $$(TARGET_MAKE_INSTALL_CMDS_DEFAULT) $(PKG)_INSTALL_CMDS = $$(TARGET_MAKE_INSTALL_CMDS_DEFAULT)
endif endif
else ifeq ($(PKG_MODE),$(filter $(PKG_MODE),MESON)) else ifeq ($(PKG_MODE),MESON)
ifeq ($(PKG_HOST_PACKAGE),YES) ifeq ($(PKG_HOST_PACKAGE),YES)
$(PKG)_INSTALL_CMDS = $$(HOST_NINJA_INSTALL_CMDS_DEFAULT) $(PKG)_INSTALL_CMDS = $$(HOST_NINJA_INSTALL_CMDS_DEFAULT)
else else

Loading…
Cancel
Save