diff options
author | David Sterba <dsterba@suse.com> | 2016-02-24 13:57:12 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-03-14 13:42:47 +0100 |
commit | b5e7979ad27146d8f225b3bc7866c1b17942b6a0 (patch) | |
tree | 4b9b9920d7a85c9d1304e3a19b81a20296222659 /Makefile.in | |
parent | 2ae0b12df07d2d24720ba34e10994351e84a150f (diff) |
btrfs-progs: build: extend per-binary objects
The standalone utilities could share object files with the main utility,
add a way to specify additional object files in a similar way to the
extra libs. The variable name must match the binary plus _objects
suffix and s/-/_/ .
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index f950b070..574fbd6c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -70,13 +70,13 @@ objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \ extent-cache.o extent_io.o volumes.o utils.o repair.o \ qgroup.o raid6.o free-space-cache.o list_sort.o props.o \ ulist.o qgroup-verify.o backref.o string-table.o task-utils.o \ - inode.o file.o find-root.o free-space-tree.o help.o \ - cmds-inspect-dump-tree.o cmds-inspect-dump-super.o + inode.o file.o find-root.o free-space-tree.o help.o cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \ cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \ cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \ cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o \ - cmds-property.o cmds-fi-usage.o + cmds-property.o cmds-fi-usage.o cmds-inspect-dump-tree.o \ + cmds-inspect-dump-super.o libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o \ uuid-tree.o utils-lib.o rbtree-utils.o libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \ @@ -126,6 +126,8 @@ endif # specify btrfs_foo_libs = <list of libs>; see $($(subst...)) rules below btrfs_convert_libs = @EXT2FS_LIBS@ @COM_ERR_LIBS@ btrfs_fragments_libs = -lgd -lpng -ljpeg -lfreetype +btrfs_debug_tree_objects = cmds-inspect-dump-tree.o +btrfs_show_super_objects = cmds-inspect-dump-super.o SUBDIRS = BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS)) @@ -252,12 +254,15 @@ $(lib_links): btrfs-%.static: $(static_objects) btrfs-%.static.o $(static_libbtrfs_objects) @echo " [LD] $@" $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $@.o $(static_objects) \ + $($(subst -,_,$(subst .static,,$@)-objects)) \ $(static_libbtrfs_objects) $(STATIC_LDFLAGS) \ $($(subst -,_,$(subst .static,,$@)-libs)) $(STATIC_LIBS) btrfs-%: $(objects) $(libs_static) btrfs-%.o @echo " [LD] $@" - $(Q)$(CC) $(CFLAGS) -o $@ $(objects) $@.o $(libs_static) \ + $(Q)$(CC) $(CFLAGS) -o $@ $(objects) $@.o \ + $($(subst -,_,$@-objects)) \ + $(libs_static) \ $(LDFLAGS) $(LIBS) $($(subst -,_,$@-libs)) btrfs: $(objects) btrfs.o $(cmds_objects) $(libs_static) |