kumquat-buildroot/package/mii-diag/mii-diag.mk

62 lines
1.9 KiB
Makefile
Raw Normal View History

2008-06-26 08:43:33 +02:00
#############################################################
#
# mii-diag
#
#############################################################
MIIDIAG_VERSION:=2.11
MIIDIAG_DEBIAN_PATCH_LEVEL:=2
MIIDIAG_SOURCE:=mii-diag_$(MIIDIAG_VERSION).orig.tar.gz
MIIDIAG_PATCH_FILE=mii-diag_$(MIIDIAG_VERSION)-$(MIIDIAG_DEBIAN_PATCH_LEVEL).diff.gz
MIIDIAG_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
MIIDIAG_DIR:=$(BUILD_DIR)/mii-diag-$(MIIDIAG_VERSION)
MIIDIAG_CAT:=$(ZCAT)
MIIDIAG_BINARY:=usr/sbin/mii-diag
ifneq ($(MIIDIAG_PATCH_FILE),)
MIIDIAG_PATCH=$(DL_DIR)/$(MIIDIAG_PATCH_FILE)
$(MIIDIAG_PATCH):
2009-01-16 12:42:52 +01:00
$(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_PATCH_FILE))
2008-06-26 08:43:33 +02:00
endif
$(DL_DIR)/$(MIIDIAG_SOURCE):
2009-01-16 12:42:52 +01:00
$(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_SOURCE))
2008-06-26 08:43:33 +02:00
$(MIIDIAG_DIR)/.unpacked: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
mkdir -p $(MIIDIAG_DIR)
$(MIIDIAG_CAT) $(DL_DIR)/$(MIIDIAG_SOURCE) | tar --strip 1 -C $(MIIDIAG_DIR) $(TAR_OPTIONS) -
ifneq ($(MIIDIAG_PATCH_FILE),)
(cd $(MIIDIAG_DIR) && $(MIIDIAG_CAT) $(MIIDIAG_PATCH) | patch -p1)
endif
toolchain/patch-kernel.sh $(MIIDIAG_DIR) package/mii-diag/ mii-diag-\*.patch*
touch $@
$(MIIDIAG_DIR)/.configured: $(MIIDIAG_DIR)/.unpacked
touch $@
$(MIIDIAG_DIR)/mii-diag: $(MIIDIAG_DIR)/.configured
$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR)
2008-06-26 08:43:33 +02:00
$(TARGET_DIR)/$(MIIDIAG_BINARY): $(MIIDIAG_DIR)/mii-diag
$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR) DESTDIR=$(TARGET_DIR) install
2008-06-26 08:43:33 +02:00
$(STRIPCMD) $@
touch $@
mii-diag: $(TARGET_DIR)/$(MIIDIAG_BINARY)
2008-06-26 08:43:33 +02:00
mii-diag-source: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
mii-diag-clean:
-$(MAKE) -C $(MIIDIAG_DIR) clean
mii-diag-dirclean:
rm -rf $(MIIDIAG_DIR)
#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(BR2_PACKAGE_MIIDIAG),y)
2008-06-26 08:43:33 +02:00
TARGETS+=mii-diag
endif