2005-09-24 02:57:27 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# mdadm
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-04-16 21:08:27 +02:00
|
|
|
MDADM_VERSION:=2.6.1
|
2005-09-24 02:57:27 +02:00
|
|
|
MDADM_SOURCE:=mdadm-$(MDADM_VERSION).tar.bz2
|
2006-11-17 16:43:51 +01:00
|
|
|
MDADM_CAT:=$(BZCAT)
|
2005-09-24 02:57:27 +02:00
|
|
|
MDADM_SITE:=http://www.kernel.org/pub/linux/utils/raid/mdadm
|
|
|
|
MDADM_DIR:=$(BUILD_DIR)/mdadm-$(MDADM_VERSION)
|
|
|
|
MDADM_BINARY:=mdadm
|
|
|
|
MDADM_TARGET_BINARY:=sbin/mdadm
|
|
|
|
|
|
|
|
$(DL_DIR)/$(MDADM_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(MDADM_SITE)/$(MDADM_SOURCE)
|
|
|
|
|
2007-04-18 21:55:14 +02:00
|
|
|
$(MDADM_DIR)/.unpacked: $(DL_DIR)/$(MDADM_SOURCE)
|
2006-11-17 16:43:51 +01:00
|
|
|
$(MDADM_CAT) $(DL_DIR)/$(MDADM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-04-18 21:55:14 +02:00
|
|
|
toolchain/patch-kernel.sh $(MDADM_DIR) package/mdadm mdadm-$(MDADM_VERSION)\*.patch
|
|
|
|
touch $@
|
2005-09-24 02:57:27 +02:00
|
|
|
|
2007-04-18 21:55:14 +02:00
|
|
|
$(MDADM_DIR)/$(MDADM_BINARY): $(MDADM_DIR)/.unpacked
|
2005-09-24 02:57:27 +02:00
|
|
|
$(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC) -C $(MDADM_DIR)
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(MDADM_TARGET_BINARY): $(MDADM_DIR)/$(MDADM_BINARY)
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(MDADM_DIR) install
|
|
|
|
rm -Rf $(TARGET_DIR)/usr/share/man
|
2007-04-18 21:55:14 +02:00
|
|
|
$(STRIP) -s $@
|
2005-09-24 02:57:27 +02:00
|
|
|
|
|
|
|
mdadm: uclibc $(TARGET_DIR)/$(MDADM_TARGET_BINARY)
|
|
|
|
|
|
|
|
mdadm-source: $(DL_DIR)/$(MDADM_SOURCE)
|
|
|
|
|
|
|
|
mdadm-clean:
|
2007-04-18 21:55:14 +02:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) -C $(MDADM_DIR) uninstall
|
2005-09-24 02:57:27 +02:00
|
|
|
-$(MAKE) -C $(MDADM_DIR) clean
|
|
|
|
|
|
|
|
mdadm-dirclean:
|
|
|
|
rm -rf $(MDADM_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_MDADM)),y)
|
|
|
|
TARGETS+=mdadm
|
|
|
|
endif
|