kumquat-buildroot/package/hotplug/hotplug.mk
Eric Andersen d06645d8ed There is no need to have a separate 'Makefile.in' file in the
general case, therefore, combine the toplevel Makefile options
such as setting TARGETS into the per-package *.mk file
2005-02-10 03:06:39 +00:00

47 lines
1.4 KiB
Makefile

#############################################################
#
# hotplug support
#
#############################################################
HOTPLUG_SOURCE=diethotplug-0.4.tar.gz
HOTPLUG_SITE=http://aleron.dl.sourceforge.net/sourceforge/linux-hotplug
HOTPLUG_DIR=$(BUILD_DIR)/diethotplug-0.4
$(DL_DIR)/$(HOTPLUG_SOURCE):
$(WGET) -P $(DL_DIR) $(HOTPLUG_SITE)/$(HOTPLUG_SOURCE)
$(HOTPLUG_DIR): $(DL_DIR)/$(HOTPLUG_SOURCE)
zcat $(DL_DIR)/$(HOTPLUG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(HOTPLUG_DIR) package/hotplug/ hotplug\*.patch
$(HOTPLUG_DIR)/hotplug: $(HOTPLUG_DIR)
$(MAKE) CROSS=$(TARGET_CROSS) DEBUG=false KLIBC=false \
KERNEL_INCLUDE_DIR=$(STAGING_DIR)/include \
TARGET_DIR=$(TARGET_DIR) -C $(HOTPLUG_DIR);
$(STRIP) $(HOTPLUG_DIR)/hotplug;
touch -c $(HOTPLUG_DIR)/hotplug
$(TARGET_DIR)/sbin/hotplug: $(HOTPLUG_DIR)/hotplug
cp $(HOTPLUG_DIR)/hotplug $(TARGET_DIR)/sbin/hotplug;
touch -c $(TARGET_DIR)/sbin/hotplug
hotplug: uclibc $(TARGET_DIR)/sbin/hotplug
hotplug-source: $(DL_DIR)/$(HOTPLUG_SOURCE)
hotplug-clean:
rm -f $(TARGET_DIR)/sbin/hotplug
-$(MAKE) -C $(HOTPLUG_DIR) clean
hotplug-dirclean:
rm -rf $(HOTPLUG_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_HOTPLUG)),y)
TARGETS+=hotplug
endif