sg3_utils.mk 2.0 KB

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