dosfstools.mk 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #############################################################
  2. #
  3. # dosfstools
  4. #
  5. #############################################################
  6. DOSFSTOOLS_VERSION:=3.0.3
  7. DOSFSTOOLS_SOURCE:=dosfstools-$(DOSFSTOOLS_VERSION).tar.gz
  8. DOSFSTOOLS_SITE:=http://www.daniel-baumann.ch/software/dosfstools
  9. DOSFSTOOLS_DIR:=$(BUILD_DIR)/dosfstools-$(DOSFSTOOLS_VERSION)
  10. DOSFSTOOLS_CAT:=$(ZCAT)
  11. MKDOSFS_BINARY:=mkdosfs
  12. MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
  13. DOSFSCK_BINARY:=dosfsck
  14. DOSFSCK_TARGET_BINARY:=sbin/dosfsck
  15. DOSFSLABEL_BINARY:=dosfslabel
  16. DOSFSLABEL_TARGET_BINARY:=sbin/dosfslabel
  17. $(DL_DIR)/$(DOSFSTOOLS_SOURCE):
  18. $(call DOWNLOAD,$(DOSFSTOOLS_SITE),$(DOSFSTOOLS_SOURCE))
  19. dosfstools-source: $(DL_DIR)/$(DOSFSTOOLS_SOURCE)
  20. $(DOSFSTOOLS_DIR)/.unpacked: $(DL_DIR)/$(DOSFSTOOLS_SOURCE) $(wildcard local/dosfstools/dosfstools*.patch)
  21. $(DOSFSTOOLS_CAT) $(DL_DIR)/$(DOSFSTOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  22. toolchain/patch-kernel.sh $(DOSFSTOOLS_DIR) package/dosfstools/ dosfstools\*.patch
  23. touch $(DOSFSTOOLS_DIR)/.unpacked
  24. $(DOSFSTOOLS_DIR)/.built : $(DOSFSTOOLS_DIR)/.unpacked
  25. $(MAKE) CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" -C $(DOSFSTOOLS_DIR)
  26. $(STRIPCMD) $(DOSFSTOOLS_DIR)/$(MKDOSFS_BINARY)
  27. $(STRIPCMD) $(DOSFSTOOLS_DIR)/$(DOSFSCK_BINARY)
  28. $(STRIPCMD) $(DOSFSTOOLS_DIR)/$(DOSFSLABEL_BINARY)
  29. touch $@
  30. $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
  31. cp -a $(DOSFSTOOLS_DIR)/$(MKDOSFS_BINARY) $@
  32. touch -c $@
  33. $(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
  34. cp -a $(DOSFSTOOLS_DIR)/$(DOSFSCK_BINARY) $@
  35. touch -c $@
  36. $(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY): $(DOSFSTOOLS_DIR)/.built
  37. cp -a $(DOSFSTOOLS_DIR)/$(DOSFSLABEL_BINARY) $@
  38. touch -c $@
  39. DOSFSTOOLS=
  40. ifeq ($(BR2_PACKAGE_DOSFSTOOLS_MKDOSFS),y)
  41. DOSFSTOOLS+=$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
  42. endif
  43. ifeq ($(BR2_PACKAGE_DOSFSTOOLS_DOSFSCK),y)
  44. DOSFSTOOLS+=$(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY)
  45. endif
  46. ifeq ($(BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL),y)
  47. DOSFSTOOLS+=$(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY)
  48. endif
  49. dosfstools: $(DOSFSTOOLS)
  50. dosfstools-clean:
  51. rm -f $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
  52. rm -f $(TARGET_DIR)/$(DOSFSCK_TARGET_BINARY)
  53. rm -f $(TARGET_DIR)/$(DOSFSLABEL_TARGET_BINARY)
  54. -$(MAKE) -C $(DOSFSTOOLS_DIR) clean
  55. dosfstools-dirclean:
  56. rm -rf $(DOSFSTOOLS_DIR)
  57. #############################################################
  58. #
  59. # Toplevel Makefile options
  60. #
  61. #############################################################
  62. ifeq ($(BR2_PACKAGE_DOSFSTOOLS),y)
  63. TARGETS+=dosfstools
  64. endif