path: root/Makefile
diff options
authorGabriel <>2013-08-17 18:56:50 +0200
committerGabriel <>2013-09-01 12:38:11 +0200
commitb15fb776c99fcab56fbbe295629749d307e2018d (patch)
tree191b6b6abb5a8de6ca53c45d4c44d6f7177c91c3 /Makefile
parent8327108eeaf3e0491b17d803da164c0827aae622 (diff)
make-bcache: Prevent stray superblocks
Fail if the device has any leftover superblock or partition table label. Add a --wipe-bcache flag to overwrite bcache superblocks and recommend wipefs for non-bcache superblocks. Once the device is safe to write, always zero immediately before the bcache superblock. Make sure errors go to stderr. Use pkg-config.
Diffstat (limited to 'Makefile')
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 10ec79c..edb4133 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,10 @@ install: make-bcache probe-bcache bcache-super-show
$(RM) -f make-bcache probe-bcache bcache-super-show bcache-test *.o
-bcache-test: LDLIBS += -lm -lssl -lcrypto
-make-bcache: LDLIBS += -luuid
+bcache-test: LDLIBS += `pkg-config --libs openssl`
+make-bcache: LDLIBS += `pkg-config --libs uuid blkid`
+make-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
make-bcache: bcache.o
-probe-bcache: LDLIBS += -luuid
-bcache-super-show: LDLIBS += -luuid
+probe-bcache: LDLIBS += `pkg-config --libs uuid`
+bcache-super-show: LDLIBS += `pkg-config --libs uuid`
bcache-super-show: bcache.o