Break the build in case of warnings. Can still be temporarily
overwritten by appending EXTRA_CFLAGS=-Wno-error to a build.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
subdir-y := driver hypervisor configs inmates
+subdir-ccflags-y := -Werror
+
# inmates build depends on generated config.mk of the hypervisor,
# and the driver needs version.h from there
$(obj)/inmates $(obj)/driver: $(obj)/hypervisor
CC = $(CROSS_COMPILE)gcc
CFLAGS = -g -O3 -I../driver -DLIBEXECDIR=\"$(libexecdir)\" \
- -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes \
+ -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
-DJAILHOUSE_VERSION=\"$(shell cat ../VERSION)\" $(EXTRA_CFLAGS)
TARGETS := jailhouse