btrfs-progs: build: list convert build objects in a variable

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-01-27 17:55:25 +01:00
parent 3a724cbde0
commit 30dc24dc84
1 changed files with 8 additions and 6 deletions

View File

@ -113,6 +113,9 @@ libbtrfs_headers = send-stream.h send-utils.h send.h kernel-lib/rbtree.h btrfs-l
kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \ kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \
kernel-lib/radix-tree.h extent-cache.h \ kernel-lib/radix-tree.h extent-cache.h \
extent_io.h ioctl.h ctree.h btrfsck.h version.h extent_io.h ioctl.h ctree.h btrfsck.h version.h
convert_objects = convert/main.o convert/common.o convert/source-fs.o \
convert/source-ext2.o
TESTS = fsck-tests.sh convert-tests.sh TESTS = fsck-tests.sh convert-tests.sh
udev_rules = 64-btrfs-dm.rules udev_rules = 64-btrfs-dm.rules
@ -225,6 +228,7 @@ endif
static_objects = $(patsubst %.o, %.static.o, $(objects)) static_objects = $(patsubst %.o, %.static.o, $(objects))
static_cmds_objects = $(patsubst %.o, %.static.o, $(cmds_objects)) static_cmds_objects = $(patsubst %.o, %.static.o, $(cmds_objects))
static_libbtrfs_objects = $(patsubst %.o, %.static.o, $(libbtrfs_objects)) static_libbtrfs_objects = $(patsubst %.o, %.static.o, $(libbtrfs_objects))
static_convert_objects = $(patsubst %.o, %.static.o, $(convert_objects))
libs_shared = libbtrfs.so.0.1 libs_shared = libbtrfs.so.0.1
libs_static = libbtrfs.a libs_static = libbtrfs.a
@ -404,17 +408,15 @@ btrfs-image.static: $(static_objects) image/main.static.o $(static_libbtrfs_obje
$(Q)$(CC) $(STATIC_CFLAGS) -o $@ image/main.static.o $(static_objects) \ $(Q)$(CC) $(STATIC_CFLAGS) -o $@ image/main.static.o $(static_objects) \
$(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS) $(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS)
btrfs-convert: $(objects) $(libs_static) convert/main.o convert/common.o convert/source-fs.o convert/source-ext2.o btrfs-convert: $(objects) $(libs_static) $(convert_objects)
@echo " [LD] $@" @echo " [LD] $@"
$(Q)$(CC) $(CFLAGS) -I$(TOPDIR)/convert -o btrfs-convert $(objects) \ $(Q)$(CC) $(CFLAGS) -I$(TOPDIR)/convert -o btrfs-convert $(objects) \
convert/main.o convert/common.o convert/source-fs.o convert/source-ext2.o $(libs_static) \ $(convert_objects) $(libs_static) \
$(LDFLAGS) $(btrfs_convert_libs) $(LIBS) $(LDFLAGS) $(btrfs_convert_libs) $(LIBS)
btrfs-convert.static: $(static_objects) convert/main.static.o convert/common.static.o \ btrfs-convert.static: $(static_objects) $(static_convert_objects) $(static_libbtrfs_objects)
convert/source-fs.static.o convert/source-ext2.static. o $(static_libbtrfs_objects)
@echo " [LD] $@" @echo " [LD] $@"
$(Q)$(CC) $(STATIC_CFLAGS) -o $@ convert/main.static.o convert/common.static.o \ $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $(static_convert_objects) $(static_objects) \
convert/source-fs.static.o convert/source-ext2.static.o $(static_objects) \
$(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(btrfs_convert_libs) $(STATIC_LIBS) $(static_libbtrfs_objects) $(STATIC_LDFLAGS) $(btrfs_convert_libs) $(STATIC_LIBS)
dir-test: $(objects) $(libs) dir-test.o dir-test: $(objects) $(libs) dir-test.o