From patchwork Tue Mar 12 15:44:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Mills X-Patchwork-Id: 2257131 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A91C13FCF6 for ; Tue, 12 Mar 2013 16:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933026Ab3CLQJk (ORCPT ); Tue, 12 Mar 2013 12:09:40 -0400 Received: from vimg1.rdg.ac.uk ([134.225.1.81]:36212 "EHLO vimg1.rdg.ac.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932216Ab3CLQJk (ORCPT ); Tue, 12 Mar 2013 12:09:40 -0400 X-Greylist: delayed 1515 seconds by postgrey-1.27 at vger.kernel.org; Tue, 12 Mar 2013 12:09:39 EDT Received: from vimh1.rdg.ac.uk ([2001:630:53:20::19d]) by vimg1.rdg.ac.uk (Exim: outgoing gateway) with esmtp id 1UFRNG-0000Fw-N7; Tue, 12 Mar 2013 15:44:22 +0000 Received: from shades.rdg.ac.uk ([134.225.205.31]) by vimh1.rdg.ac.uk (Exim: virusscanner) with esmtps id 1UFRNG-0001cB-GQ; Tue, 12 Mar 2013 15:44:22 +0000 Received: from hrm by shades.rdg.ac.uk with local (Exim 4.80) (envelope-from ) id 1UFRNF-0002fD-K3; Tue, 12 Mar 2013 15:44:21 +0000 From: Hugo Mills To: linux-btrfs@vger.kernel.org Cc: Hugo Mills , Hugo Mills Subject: [PATCH] btrfs-progs: add Makefile rule for static build of btrfs-find-root Date: Tue, 12 Mar 2013 15:44:11 +0000 Message-Id: <1363103051-10207-1-git-send-email-hugo@carfax.org.uk> X-Mailer: git-send-email 1.7.10.4 X-Scan-Signature: 28fd6e9f905a6bce16268047b229515f Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Hugo Mills btrfs-find-root isn't yet integrated into the main btrfs tool, and is an important recovery tool, so it deserves to be built as a static binary. Signed-off-by: Hugo Mills --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d102dee..c519d21 100644 --- a/Makefile +++ b/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 btrfs-find-root.static version.h: $(Q)bash version.sh @@ -122,6 +122,10 @@ btrfs-find-root: $(objects) $(libs) find-root.o @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) -o btrfs-find-root find-root.o $(objects) $(LDFLAGS) $(LIBS) +btrfs-find-root.static: $(static_objects) $(libs) find-root.static.o + @echo " [LD] $@" + $(Q)$(CC) $(STATIC_CFLAGS) -o btrfs-find-root.static find-root.static.o $(static_objects) $(STATIC_LDFLAGS) $(STATIC_LIBS) + btrfsctl: $(objects) $(libs) btrfsctl.o @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) -o btrfsctl btrfsctl.o $(objects) $(LDFLAGS) $(LIBS)