X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Makefile;h=5c5ea5fc02f277679f85f65abe54037e3c960b5b;hb=4e158e155327d09868453ae9759a58284245175a;hp=9f2773ec39c1609af40405826f48d2d88746d3f6;hpb=bca2b16e55bb1f5ac1894b97332d8b637c941123;p=bcachefs-tools-debian diff --git a/Makefile b/Makefile index 9f2773e..5c5ea5f 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ PREFIX=/usr INSTALL=install -CFLAGS+=-std=gnu99 -O2 -Wall -g -D_FILE_OFFSET_BITS=64 -I. +CFLAGS+=-std=gnu99 -O2 -Wall -g -MMD -D_FILE_OFFSET_BITS=64 -I. LDFLAGS+=-static -PKGCONFIG_LIBS="blkid uuid libnih" +PKGCONFIG_LIBS="blkid uuid" CFLAGS+=`pkg-config --cflags ${PKGCONFIG_LIBS}` -LDLIBS+=`pkg-config --libs ${PKGCONFIG_LIBS}` -lscrypt -lsodium -lkeyutils +LDLIBS+=`pkg-config --libs ${PKGCONFIG_LIBS}` -lscrypt -lsodium -lkeyutils -lm ifeq ($(PREFIX),/usr) ROOT_SBINDIR=/sbin @@ -26,6 +26,8 @@ libccan.a: $(CCANOBJS) bcache-objs = bcache.o bcache-assemble.o bcache-device.o bcache-format.o\ bcache-fs.o bcache-run.o bcache-key.o libbcache.o crypto.o util.o +-include $(bcache-objs:.o=.d) + bcache: $(bcache-objs) libccan.a .PHONY: install @@ -38,7 +40,7 @@ install: bcache .PHONY: clean clean: - $(RM) bcache *.o *.a + $(RM) bcache *.o *.d *.a .PHONY: deb deb: all