summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-01-30 18:15:31 +0100
committerDavid Sterba <dsterba@suse.com>2017-03-08 13:00:46 +0100
commitd7e3f1d0b7334f4c3e03d23788937905b9e43561 (patch)
treef6da2e6c8e537b5c39bb6d5f15ac49253da24728 /Makefile
parentf6dfc0263dff83c28fb4af7de8876722eb2202ac (diff)
btrfs-progs: build: build library by default
Add a convenience rule and build the library by default, not just at the installation phase. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8354224b..30bd01f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
#
# Basic build targets:
-# all all main tools
+# all all main tools and the shared library
# static build static bnaries, requires static version of the libraries
# test run the full testsuite
# install install to default location (/usr/local)
@@ -260,7 +260,7 @@ endif
$(Q)$(CC) $(STATIC_CFLAGS) -c $< -o $@ $($(subst -,_,$(@:%.static.o=%)-cflags)) \
$($(subst -,_,btrfs-$(@:%/$(notdir $@)=%)-cflags))
-all: $(progs) $(BUILDDIRS)
+all: $(progs) libbtrfs $(BUILDDIRS)
$(SUBDIRS): $(BUILDDIRS)
$(BUILDDIRS):
@echo "Making all in $(patsubst build-%,%,$@)"
@@ -313,6 +313,8 @@ version.h: version.sh version.h.in configure.ac
@echo " [SH] $@"
$(Q)bash ./config.status --silent $@
+libbtrfs: $(libs_shared) $(lib_links)
+
$(libs_shared): $(libbtrfs_objects) $(lib_links) send.h
@echo " [LD] $@"
$(Q)$(CC) $(CFLAGS) $(libbtrfs_objects) $(LDFLAGS) $(LIBBTRFS_LIBS) \