summaryrefslogtreecommitdiffstats
path: root/obsolete-buildroot/make/mkdosfs.mk
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-05-25 04:32:27 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2004-05-25 04:32:27 +0000
commit3ac1acb9ea70080aaaf49ae211835f057e60eefa (patch)
treea2e08d2be3224409a033d25af8861d9853e72de7 /obsolete-buildroot/make/mkdosfs.mk
parent1eb1b593980fdc06ab92f8e354129b0aadc4f1b0 (diff)
Initial revision
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'obsolete-buildroot/make/mkdosfs.mk')
-rw-r--r--obsolete-buildroot/make/mkdosfs.mk44
1 files changed, 44 insertions, 0 deletions
diff --git a/obsolete-buildroot/make/mkdosfs.mk b/obsolete-buildroot/make/mkdosfs.mk
new file mode 100644
index 000000000..98288afed
--- /dev/null
+++ b/obsolete-buildroot/make/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 ($(strip $(BUILD_WITH_LARGEFILE)),true)
+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)
+