From 2648a11841fef0f91af6bf649d2069d09ea35765 Mon Sep 17 00:00:00 2001 From: Antoine Sirinelli Date: Mon, 11 Mar 2013 21:17:17 +0000 Subject: btrfs-progs: Add a rule to build a static mkfs.btrfs Static mkfs.btrfs can be used to "bootstrap" a system from a live CD which does not provide mkfs.btrfs. The executable produced is named mkfs.btrfs.static and built by invoking the "static" make rule. Signed-off-by: Antoine Sirinelli --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d102dee0..55ff5b4c 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,7 @@ all: version.h $(progs) manpages # NOTE: For static compiles, you need to have all the required libs # static equivalent available # -static: version.h $(libs) btrfs.static +static: version.h $(libs) btrfs.static mkfs.btrfs.static version.h: $(Q)bash version.sh @@ -143,6 +143,11 @@ mkfs.btrfs: $(objects) $(libs) mkfs.o @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) -o mkfs.btrfs $(objects) mkfs.o $(LDFLAGS) $(LIBS) -lblkid +mkfs.btrfs.static: $(static_objects) mkfs.static.o + @echo " [LD] $@" + $(Q)$(CC) $(STATIC_CFLAGS) -o mkfs.btrfs.static mkfs.static.o \ + $(static_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS) + btrfs-debug-tree: $(objects) $(libs) debug-tree.o @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) -o btrfs-debug-tree $(objects) debug-tree.o $(LDFLAGS) $(LIBS) @@ -204,7 +209,8 @@ install-man: clean : @echo "Cleaning" $(Q)rm -f $(progs) cscope.out *.o .*.d btrfs-convert btrfs-image btrfs-select-super \ - btrfs-zero-log btrfstune dir-test ioctl-test quick-test send-test btrfs.static btrfsck \ + btrfs-zero-log btrfstune dir-test ioctl-test quick-test send-test btrfsck \ + btrfs.static mkfs.btrfs.static \ version.h \ $(libs) $(lib_links) $(Q)$(MAKE) $(MAKEOPTS) -C man $@ -- cgit v1.2.3