diff options
author | Antoine Sirinelli <antoine@monte-stello.com> | 2013-03-11 21:17:17 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-03-12 16:23:14 +0100 |
commit | 2648a11841fef0f91af6bf649d2069d09ea35765 (patch) | |
tree | 6fceefbd8095f074297ff8a62677b7680d3c6ba6 /Makefile | |
parent | dd21bc16ad9bfd87df9311b39dad425ee533eb78 (diff) |
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 <antoine@monte-stello.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 $@ |