]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - Makefile
bcacheadm: fix status for forcefully pulled devs
[bcachefs-tools-debian] / Makefile
index 4f9f7c542059c484b8514f4db3932377a1109982..cda518757fcbe87765c4951d96786cb9ff45f6bb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,15 +3,16 @@ PREFIX=/usr
 UDEVLIBDIR=/lib/udev
 DRACUTLIBDIR=/lib/dracut
 INSTALL=install
-CFLAGS+=-O2 -Wall -g
+CFLAGS+=-O2 -Wall -Werror -g -I.
 
-all: make-bcache probe-bcache bcache-super-show
+all: bcacheadm make-bcache probe-bcache bcachectl
 
-install: make-bcache probe-bcache bcache-super-show
-       $(INSTALL) -m0755 make-bcache bcache-super-show $(DESTDIR)${PREFIX}/sbin/
+install: bcacheadm make-bcache probe-bcache
+       $(INSTALL) -m0755 bcacheadm bcachectl $(DESTDIR)${PREFIX}/sbin/
+       $(INSTALL) -m0755 make-bcache bcachectl $(DESTDIR)${PREFIX}/sbin/
        $(INSTALL) -m0755 probe-bcache bcache-register          $(DESTDIR)$(UDEVLIBDIR)/
        $(INSTALL) -m0644 69-bcache.rules       $(DESTDIR)$(UDEVLIBDIR)/rules.d/
-       -$(INSTALL) -T -m0755 initramfs/hook    $(DESTDIR)/usr/share/initramfs-tools/hooks/bcache
+       #-$(INSTALL) -T -m0755 initramfs/hook   $(DESTDIR)/usr/share/initramfs-tools/hooks/bcache
        if [ -d $(DESTDIR)$(DRACUTLIBDIR)/modules.d ]; \
        then $(INSTALL) -D -m0755 dracut/module-setup.sh $(DESTDIR)$(DRACUTLIBDIR)/modules.d/90bcache/module-setup.sh; \
        fi
@@ -19,14 +20,23 @@ install: make-bcache probe-bcache bcache-super-show
 #      $(INSTALL) -m0755 bcache-test $(DESTDIR)${PREFIX}/sbin/
 
 clean:
-       $(RM) -f make-bcache probe-bcache bcache-super-show bcache-test *.o
+       $(RM) -f make-bcache probe-bcache bcache-super-show bcache-test bcachectl *.o
 
 bcache-test: LDLIBS += `pkg-config --libs openssl`
+
+bcacheadm: LDLIBS += `pkg-config --libs uuid blkid libnih`
+bcacheadm: CFLAGS += `pkg-config --cflags uuid blkid libnih`
+bcacheadm: bcache.o
+
 make-bcache: LDLIBS += `pkg-config --libs uuid blkid`
 make-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
 make-bcache: bcache.o
+
 probe-bcache: LDLIBS += `pkg-config --libs uuid blkid`
 probe-bcache: CFLAGS += `pkg-config --cflags uuid blkid`
+
 bcache-super-show: LDLIBS += `pkg-config --libs uuid`
 bcache-super-show: CFLAGS += -std=gnu99
 bcache-super-show: bcache.o
+
+bcachectl: bcachectl.o