aboutsummaryrefslogtreecommitdiff
path: root/package/mii-diag/mii-diag.mk
blob: f74fa3def078b948fc1132fc68abc27eb67c1b37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#############################################################
#
# mii-diag
#
#############################################################
MII_DIAG_VERSION = 2.11
MII_DIAG_SOURCE  = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz
MII_DIAG_PATCH   = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz
MII_DIAG_SITE    = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag

MII_DIAG_MAKE_OPT = $(TARGET_CONFIGURE_OPTS)

ifeq ($(BR2_PREFER_STATIC_LIB),y)
MII_DIAG_MAKE_OPT += CFLAGS="$(TARGET_CFLAGS) -static"
endif

define MII_DIAG_DEBIAN_PATCHES
	if [ -d $(@D)/debian/patches ]; then \
		support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
	fi
endef

MII_DIAG_POST_PATCH_HOOKS = MII_DIAG_DEBIAN_PATCHES

define MII_DIAG_BUILD_CMDS
	$(MAKE) $(MII_DIAG_MAKE_OPT) -C $(@D)
endef

define MII_DIAG_INSTALL_TARGET_CMDS
	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
endef

define MII_DIAG_UNINSTALL_TARGET_CMDS
	rm -f $(TARGET_DIR)/usr/sbin/mii-diag
endef

define MII_DIAG_CLEAN_CMDS
	$(MAKE) -C $(@D) clean
endef

$(eval $(call GENTARGETS))