summaryrefslogtreecommitdiff
path: root/package/mkdosfs/mkdosfs.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-10-09 01:24:28 +0000
committerEric Andersen <andersen@codepoet.org>2004-10-09 01:24:28 +0000
commit73f7be82904f487d167493e76b415fbe5b5f8c5a (patch)
tree8d9acaf4414892fad533fd92ebfc7e65a2ad2785 /package/mkdosfs/mkdosfs.mk
parent0b5ad783691ef6fa1285c8d7858a51c425a8b38d (diff)
Remove the old 'make' directory, and populate the new 'package'
directory.
Diffstat (limited to 'package/mkdosfs/mkdosfs.mk')
-rw-r--r--package/mkdosfs/mkdosfs.mk44
1 files changed, 44 insertions, 0 deletions
diff --git a/package/mkdosfs/mkdosfs.mk b/package/mkdosfs/mkdosfs.mk
new file mode 100644
index 000000000..71d768bae
--- /dev/null
+++ b/package/mkdosfs/mkdosfs.mk
@@ -0,0 +1,44 @@
+#############################################################
+#
+# mkdosfs
+#
+#############################################################
+MKDOSFS_SOURCE=dosfstools-2.8.src.tar.gz
+MKDOSFS_SITE=http://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools
+MKDOSFS_DIR=$(BUILD_DIR)/dosfstools-2.8
+MKDOSFS_CAT:=zcat
+MKDOSFS_BINARY:=mkdosfs/mkdosfs
+MKDOSFS_TARGET_BINARY:=sbin/mkdosfs
+ifeq ($(BR2_LARGEFILE),y)
+MKDOSFS_CFLAGS="-Os -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+else
+MKDOSFS_CFLAGS="-Os -g"
+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)
+ $(MKDOSFS_CAT) $(DL_DIR)/$(MKDOSFS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(MKDOSFS_DIR)/.unpacked
+
+$(MKDOSFS_DIR)/$(MKDOSFS_BINARY): $(MKDOSFS_DIR)/.unpacked
+ $(MAKE) CFLAGS=$(MKDOSFS_CFLAGS) CC=$(TARGET_CC) -C $(MKDOSFS_DIR);
+ $(STRIP) $(MKDOSFS_DIR)/mkdosfs/mkdosfs;
+ 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:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(MKDOSFS_DIR) uninstall
+ -$(MAKE) -C $(MKDOSFS_DIR) clean
+
+mkdosfs-dirclean:
+ rm -rf $(MKDOSFS_DIR)
+