8 PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
9 I_$(1) := $(PKG_BUILD_DIR)/ipkg/$(2)
11 ifeq ($$(KDEPEND_$(1)),m)
12 ifneq ($(BR2_PACKAGE_KMOD_$(1)),)
13 TARGETS += $$(PKG_$(1))
15 ifeq ($(BR2_PACKAGE_KMOD_$(1)),y)
16 INSTALL_TARGETS += $$(PKG_$(1))
20 $$(PKG_$(1)): $(LINUX_DIR)/.modules_done
21 mkdir -p $$(I_$(1))/lib/modules/$(LINUX_VERSION)
22 $(SCRIPT_DIR)/make-ipkg-dir.sh $$(I_$(1)) ../control/kmod-$(2).control $(LINUX_VERSION)-$(PKG_RELEASE) $(ARCH)
23 cp $(3) $$(I_$(1))/lib/modules/$(LINUX_VERSION)
24 $(IPKG_BUILD) $$(I_$(1)) $(PACKAGE_DIR)