From ea471349bfe6f6a95877947db18f72c4cf693630 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 15 Aug 2014 10:23:32 +0200 Subject: build: Add build flag to enable sparse checking of C source files Similar to the 'make C=1' for the Linux kernel, wire up the sparse command for our build system in a similar fashion. Use 'make C=1 [tool]' to check the source files using sparse. Of course, the sparse tool needs to be installed and available in your $PATH for this to work. Signed-off-by: Tobias Klauser --- Template | 1 + 1 file changed, 1 insertion(+) (limited to 'Template') diff --git a/Template b/Template index e3093ea..4978eed 100644 --- a/Template +++ b/Template @@ -21,5 +21,6 @@ define TOOL_templ $(1)/%.tab.o: $(1)/%.tab.c $$(CC) $$(CFLAGS) -o $$@ -c $$< $(1)/%.o: %.c + $$(CHECK) $$(CFLAGS) $$(CHECKFLAGS) $$< $$(CC) $$(CFLAGS) -o $(1)/$$(shell basename $$@) -c $$< endef -- cgit v1.2.3-54-g00ecf