summaryrefslogtreecommitdiffstats
path: root/package/module-init-tools/module-init-tools.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/module-init-tools/module-init-tools.mk')
-rw-r--r--package/module-init-tools/module-init-tools.mk73
1 files changed, 73 insertions, 0 deletions
diff --git a/package/module-init-tools/module-init-tools.mk b/package/module-init-tools/module-init-tools.mk
new file mode 100644
index 000000000..75bbf1b19
--- /dev/null
+++ b/package/module-init-tools/module-init-tools.mk
@@ -0,0 +1,73 @@
+#############################################################
+#
+# module-init-tools
+#
+#############################################################
+MODULE_INIT_TOOLS_SOURCE=module-init-tools-3.1.tar.bz2
+MODULE_INIT_TOOLS_SITE=ftp://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/
+MODULE_INIT_TOOLS_DIR=$(BUILD_DIR)/module-init-tools-3.1
+MODULE_INIT_TOOLS_BINARY=modprobe
+MODULE_INIT_TOOLS_TARGET_BINARY=$(TARGET_DIR)/sbin/$(MODULE_INIT_TOOLS_BINARY)
+
+STRIPPROG=$(STRIP)
+
+$(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(MODULE_INIT_TOOLS_SITE)/$(MODULE_INIT_TOOLS_SOURCE)
+
+$(MODULE_INIT_TOOLS_DIR)/.source: $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE)
+ bzcat $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ toolchain/patch-kernel.sh $(MODULE_INIT_TOOLS_DIR) \
+ package/module-init-tools \*.patch
+ touch $(MODULE_INIT_TOOLS_DIR)/.source
+
+$(MODULE_INIT_TOOLS_DIR)/.configured: $(MODULE_INIT_TOOLS_DIR)/.source
+ (cd $(MODULE_INIT_TOOLS_DIR); \
+ $(TARGET_CONFIGURE_OPTS) \
+ INSTALL=$(MODULE_INIT_TOOLS_DIR)/install-sh \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/ \
+ --sysconfdir=/etc \
+ --program-transform-name='' \
+ );
+ touch $(MODULE_INIT_TOOLS_DIR)/.configured;
+
+$(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY): $(MODULE_INIT_TOOLS_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(MODULE_INIT_TOOLS_DIR)
+
+ifeq ($(strip $(BR2_PACKAGE_MODUTILS)),y)
+$(TARGET_DIR)/$(MODULE_INIT_TOOLS_TARGET_BINARY): \
+ $(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY) \
+ modutils
+else
+$(TARGET_DIR)/$(MODULE_INIT_TOOLS_TARGET_BINARY): \
+ $(MODULE_INIT_TOOLS_DIR)/$(MODULE_INIT_TOOLS_BINARY)
+endif
+ifeq ($(strip $(BR2_PACKAGE_MODUTILS)),y)
+ $(MAKE) prefix=$(TARGET_DIR) -C $(MODULE_INIT_TOOLS_DIR) moveold
+endif
+ STRIPPROG='$(STRIPPROG)' \
+ $(MAKE) prefix=$(TARGET_DIR) -C $(MODULE_INIT_TOOLS_DIR) install-exec
+ rm -Rf $(TARGET_DIR)/usr/man
+
+module-init-tools: uclibc $(TARGET_DIR)/$(MODULE_INIT_TOOLS_TARGET_BINARY)
+
+module-init-tools-source: $(DL_DIR)/$(MODULE_INIT_TOOLS_SOURCE)
+
+module-init-tools-clean:
+ $(MAKE) prefix=$(TARGET_DIR)/usr -C $(MODULE_INIT_TOOLS_DIR) uninstall
+ -$(MAKE) -C $(MODULE_INIT_TOOLS_DIR) clean
+
+module-init-tools-dirclean:
+ rm -rf $(MODULE_INIT_TOOLS_DIR)
+
+#############################################################
+#
+## Toplevel Makefile options
+#
+##############################################################
+ifeq ($(strip $(BR2_PACKAGE_MODULE_INIT_TOOLS)),y)
+TARGETS+=module-init-tools
+endif