1 ################################################################################
5 ################################################################################
7 SG3_UTILS_VERSION = 1.48
8 SG3_UTILS_SOURCE = sg3_utils-$(SG3_UTILS_VERSION).tar.xz
9 SG3_UTILS_SITE = http://sg.danny.cz/sg/p
10 SG3_UTILS_LICENSE = BSD-2-Clause (library)
11 # Some utils progs are GPL-2.0+ licensed while others are BSD-3-Clause
12 ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),y)
13 SG3_UTILS_LICENSE += , GPL-2.0+ (programs), BSD-2-Clause (programs)
15 SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE
17 # install the libsgutils2 library
18 SG3_UTILS_INSTALL_STAGING = YES
20 # Uses __atomic_fetch_add_4
21 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
22 SG3_UTILS_CONF_ENV += LIBS="-latomic"
25 SG3_UTILS_CFLAGS = $(TARGET_CFLAGS)
27 ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_104028),y)
28 SG3_UTILS_CFLAGS += -O0
31 SG3_UTILS_CONF_ENV += CFLAGS="$(SG3_UTILS_CFLAGS)"
33 ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
34 define SG3_UTILS_REMOVE_PROGS
36 compare_and_write copy_results dd decode_sense \
37 emc_trespass format get_config \
38 get_lba_status ident inq logs luns map26 \
39 map sgm_dd modes opcodes sgp_dd persist prevent \
40 raw rbuf rdac read readcap read_block_limits \
41 read_attr read_buffer read_long reassign referrals \
42 rep_zones requests reset reset_wp rmsn rtpg safte sanitize \
43 sat_identify sat_phy_event sat_read_gplog sat_set_features \
44 scan senddiag ses ses_microcode start stpg sync test_rwbuf \
45 timestamp turs unmap verify vpd write_buffer write_long \
46 write_same write_verify wr_mode xcopy zone; do \
47 $(RM) $(TARGET_DIR)/usr/bin/sg_$${prog} ; \
50 logging_level mandat readcap ready satl start stop \
52 $(RM) $(TARGET_DIR)/usr/bin/scsi_$${prog} ; \
55 sginfo sgm_dd sgp_dd; do \
56 $(RM) $(TARGET_DIR)/usr/bin/$${prog}; \
60 SG3_UTILS_POST_INSTALL_TARGET_HOOKS += SG3_UTILS_REMOVE_PROGS
63 $(eval $(autotools-package))
64 $(eval $(host-autotools-package))