source: trunk/openwrt/target/linux/rules.mk @ 1195

Last change on this file since 1195 was 1195, checked in by nbd, 11 years ago

add kernel package with version-specific /etc/modules

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 682 bytes
Line 
1define KMOD_template
2ifeq ($$(strip $(4)),)
3KDEPEND_$(1):=m
4else
5KDEPEND_$(1):=$($(4))
6endif
7
8PKG_$(1) := $(PACKAGE_DIR)/kmod-$(2)_$(LINUX_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
9I_$(1) := $(PKG_BUILD_DIR)/ipkg/$(2)
10
11ifeq ($$(KDEPEND_$(1)),m)
12ifneq ($(BR2_PACKAGE_KMOD_$(1)),)
13TARGETS += $$(PKG_$(1))
14endif
15ifeq ($(BR2_PACKAGE_KMOD_$(1)),y)
16INSTALL_TARGETS += $$(PKG_$(1))
17endif
18endif
19
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)
25
26endef
Note: See TracBrowser for help on using the repository browser.