build: use 'find', not 'git', to locate C source code

We will not always have .git available in some cases. For example, if someone
simply downloaded a tarball of the tree, or if we're building with something
like Nix and want to exclude the .git folder, we need to cope and build the
source anyway.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2017-11-26 00:55:12 -06:00
parent 4ac5ad0832
commit 04035f0c7e

View File

@ -44,7 +44,7 @@ endif
.PHONY: all .PHONY: all
all: bcachefs all: bcachefs
SRCS=$(shell git ls-files '*.c') SRCS=$(shell find . -type f -iname '*.c')
DEPS=$(SRCS:.c=.d) DEPS=$(SRCS:.c=.d)
-include $(DEPS) -include $(DEPS)