2003-01-19 05:27:22 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# mkdosfs
|
|
|
|
#
|
|
|
|
#############################################################
|
2005-12-29 19:28:40 +08:00
|
|
|
MKDOSFS_VER:=2.11
|
|
|
|
MKDOSFS_SOURCE:=dosfstools-$(MKDOSFS_VER).src.tar.gz
|
|
|
|
MKDOSFS_SITE:=http://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools
|
|
|
|
MKDOSFS_DIR:=$(BUILD_DIR)/dosfstools-$(MKDOSFS_VER)
|
2006-10-01 23:17:52 +08:00
|
|
|
MKDOSFS_CAT:=$(ZCAT)
|
2003-01-19 05:27:22 +08:00
|
|
|
MKDOSFS_BINARY:=mkdosfs/mkdosfs
|
|
|
|
MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
|
2005-12-29 19:28:40 +08:00
|
|
|
|
|
|
|
MKDOSFS_CFLAGS=$(TARGET_CFLAGS)
|
2004-10-09 09:06:03 +08:00
|
|
|
ifeq ($(BR2_LARGEFILE),y)
|
2005-12-29 19:28:40 +08:00
|
|
|
MKDOSFS_CFLAGS+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
2003-01-19 05:27:22 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
$(DL_DIR)/$(MKDOSFS_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(MKDOSFS_SITE)/$(MKDOSFS_SOURCE)
|
|
|
|
|
|
|
|
mkdosfs-source: $(DL_DIR)/$(MKDOSFS_SOURCE)
|
|
|
|
|
|
|
|
$(MKDOSFS_DIR)/.unpacked: $(DL_DIR)/$(MKDOSFS_SOURCE)
|
2004-10-10 05:19:47 +08:00
|
|
|
$(MKDOSFS_CAT) $(DL_DIR)/$(MKDOSFS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2003-01-19 05:27:22 +08:00
|
|
|
touch $(MKDOSFS_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(MKDOSFS_DIR)/$(MKDOSFS_BINARY): $(MKDOSFS_DIR)/.unpacked
|
2005-12-29 19:28:40 +08:00
|
|
|
$(MAKE) CFLAGS="$(MKDOSFS_CFLAGS)" CC="$(TARGET_CC)" -C $(MKDOSFS_DIR);
|
|
|
|
$(STRIP) $(MKDOSFS_DIR)/mkdosfs/mkdosfs
|
2003-01-19 05:27:22 +08:00
|
|
|
touch -c $(MKDOSFS_DIR)/mkdosfs/mkdosfs
|
|
|
|
|
|
|
|
$(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY): $(MKDOSFS_DIR)/$(MKDOSFS_BINARY)
|
|
|
|
cp -a $(MKDOSFS_DIR)/$(MKDOSFS_BINARY) $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
|
|
|
|
touch -c $(TARGET_DIR)/sbin/mkdosfs
|
|
|
|
|
|
|
|
mkdosfs: uclibc $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
|
|
|
|
|
|
|
|
mkdosfs-clean:
|
2003-01-19 14:07:22 +08:00
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKDOSFS_DIR) uninstall
|
2003-01-19 05:27:22 +08:00
|
|
|
-$(MAKE) -C $(MKDOSFS_DIR) clean
|
|
|
|
|
|
|
|
mkdosfs-dirclean:
|
|
|
|
rm -rf $(MKDOSFS_DIR)
|
|
|
|
|
2005-02-10 11:06:39 +08:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_MKDOSFS)),y)
|
|
|
|
TARGETS+=mkdosfs
|
|
|
|
endif
|