Files
scoutfs/kmod/Makefile
Zach Brown ccf5301c37 scoutfs: add -Werror for build errors
We insist on a warning free build but it's up to human diligence to
discover and address warnings.  We've also caught errors when compilers
in automated testing saw problems that the compilers in developer
environments didn't.  That is, a human only could have noticed by
investigating the output from successful test runs.

Let's put some weight behind our promise of a warning free build and
turn gcc warnings into errors.

Signed-off-by: Zach Brown <zab@versity.com>
2017-09-28 13:59:49 -07:00

31 lines
671 B
Makefile

ALL: module
# default to building against the installed source for the running kernel
ifeq ($(SK_KSRC),)
SK_KSRC := $(shell echo /lib/modules/`uname -r`/build)
endif
# fail if sparse fails if we find it
ifeq ($(shell sparse && echo found),found)
SP =
else
SP = @:
endif
SCOUTFS_GIT_DESCRIBE := \
$(shell git describe --all --abbrev=6 --long 2>/dev/null || \
echo not-in-a-git-repository)
SCOUTFS_ARGS := SCOUTFS_GIT_DESCRIBE=$(SCOUTFS_GIT_DESCRIBE) \
CONFIG_SCOUTFS_FS=m -C $(SK_KSRC) M=$(CURDIR)/src \
EXTRA_CFLAGS=-Werror
all: module
module:
make $(SCOUTFS_ARGS)
$(SP) make C=2 CF="-D__CHECK_ENDIAN__" $(SCOUTFS_ARGS)
clean:
make $(SCOUTFS_ARGS) clean