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>
This commit is contained in:
parent
dd21bc16ad
commit
2648a11841
10
Makefile
10
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 $@
|
||||
|
|
Loading…
Reference in New Issue