4 CFLAGS+=-std=gnu99 -O2 -Wall -g -D_FILE_OFFSET_BITS=64 -I.
7 PKGCONFIG_LIBS="blkid uuid libnih"
8 CFLAGS+=`pkg-config --cflags ${PKGCONFIG_LIBS}`
9 LDLIBS+=`pkg-config --libs ${PKGCONFIG_LIBS}` -lscrypt -lsodium -lkeyutils
11 ifeq ($(PREFIX), "/usr")
14 ROOT_SBINDIR=$(PREFIX)/sbin
20 $(INSTALL) -m0755 bcache $(DESTDIR)$(ROOT_SBINDIR)
21 $(INSTALL) -m0644 -- bcache.8 $(DESTDIR)$(PREFIX)/share/man/man8/
26 CCANSRCS=$(wildcard ccan/*/*.c)
27 CCANOBJS=$(patsubst %.c,%.o,$(CCANSRCS))
29 libccan.a: $(CCANOBJS)
30 $(AR) r $@ $(CCANOBJS)
32 bcache-objs = bcache.o bcache-assemble.o bcache-device.o bcache-format.o\
33 bcache-fs.o bcache-run.o bcache-key.o libbcache.o crypto.o util.o
35 bcache: $(bcache-objs) libccan.a
38 debuild -nc -us -uc -i -I