linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] add static compile target to make file
@ 2013-01-25 23:20 Ian Kumlien
  0 siblings, 0 replies; only message in thread
From: Ian Kumlien @ 2013-01-25 23:20 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

Hi, 

This is something i have been hacking in several times when i have had
odd issues or had to use a special version of btrfs-progs to handle
issues.

Anyway, thought i'd send something generic enough for everyone =).

[-- Attachment #2: 0001-RFC-Add-static-compile-target.patch --]
[-- Type: text/x-diff, Size: 810 bytes --]

>From 42f4bae2d2e8ee4a46a36454f7d9e3c63a6284d2 Mon Sep 17 00:00:00 2001
From: Ian Kumlien <pomac@demius.net>
Date: Sat, 26 Jan 2013 00:12:28 +0100
Subject: [PATCH] [RFC] Add static compile target

Sometimes, when you least expect it, a static binary is what you need to
rescue your data... Or just get a good enough handle on things to make
it work again ;)

"make static" is a gift to you, dear user with filesystem problems!
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 4894903..9148d0b 100644
--- a/Makefile
+++ b/Makefile
@@ -117,4 +117,8 @@ install: $(progs) install-man
 	$(INSTALL) -m755 -d $(DESTDIR)$(bindir)
 	$(INSTALL) $(progs) $(DESTDIR)$(bindir)
 
+static: CFLAGS += -static
+static: LIBS += -lpthread
+static: all
+
 -include .*.d
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-25 23:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 23:20 [RFC] add static compile target to make file Ian Kumlien

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).