pass ARCH down to uClibc
[buildroot.git] / package / mkdosfs / mkdosfs.mk
blob97a9aea501041c4c954766e1a274a93d3b0be79f
1 #############################################################
3 # mkdosfs
5 #############################################################
6 MKDOSFS_VERSION:=2.11
7 MKDOSFS_SOURCE:=dosfstools-$(MKDOSFS_VERSION).src.tar.gz
8 MKDOSFS_SITE:=http://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools
9 MKDOSFS_DIR:=$(BUILD_DIR)/dosfstools-$(MKDOSFS_VERSION)
10 MKDOSFS_CAT:=$(ZCAT)
11 MKDOSFS_BINARY:=mkdosfs/mkdosfs
12 MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
14 MKDOSFS_CFLAGS=$(TARGET_CFLAGS)
15 ifeq ($(BR2_LARGEFILE),y)
16 MKDOSFS_CFLAGS+= -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
17 endif
19 $(DL_DIR)/$(MKDOSFS_SOURCE):
20 $(WGET) -P $(DL_DIR) $(MKDOSFS_SITE)/$(MKDOSFS_SOURCE)
22 mkdosfs-source: $(DL_DIR)/$(MKDOSFS_SOURCE)
24 $(MKDOSFS_DIR)/.unpacked: $(DL_DIR)/$(MKDOSFS_SOURCE)
25 $(MKDOSFS_CAT) $(DL_DIR)/$(MKDOSFS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
26 touch $(MKDOSFS_DIR)/.unpacked
28 $(MKDOSFS_DIR)/$(MKDOSFS_BINARY): $(MKDOSFS_DIR)/.unpacked
29 $(MAKE) CFLAGS="$(MKDOSFS_CFLAGS)" CC="$(TARGET_CC)" -C $(MKDOSFS_DIR)
30 $(STRIPCMD) $(MKDOSFS_DIR)/mkdosfs/mkdosfs
31 touch -c $(MKDOSFS_DIR)/mkdosfs/mkdosfs
33 $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY): $(MKDOSFS_DIR)/$(MKDOSFS_BINARY)
34 cp -a $(MKDOSFS_DIR)/$(MKDOSFS_BINARY) $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
35 touch -c $(TARGET_DIR)/sbin/mkdosfs
37 mkdosfs: $(TARGET_DIR)/$(MKDOSFS_TARGET_BINARY)
39 mkdosfs-clean:
40 $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKDOSFS_DIR) uninstall
41 -$(MAKE) -C $(MKDOSFS_DIR) clean
43 mkdosfs-dirclean:
44 rm -rf $(MKDOSFS_DIR)
46 #############################################################
48 # Toplevel Makefile options
50 #############################################################
51 ifeq ($(BR2_PACKAGE_MKDOSFS),y)
52 TARGETS+=mkdosfs
53 endif