aboutsummaryrefslogtreecommitdiffstats
path: root/BuildTests/StaticAnalysisTest/makefile
blob: 44c7d5f820592082ad1d704bfa946d17f0eae730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
#             LUFA Library
#     Copyright (C) Dean Camera, 2011.
#
#  dean [at] fourwalledcubicle [dot] com
#           www.lufa-lib.org
#

# Static anlysis of the entire LUFA source tree, using the free cross-platform "cppcheck" tool.

# Path to the root of the LUFA tree to scan
LUFA_ROOT_PATH    = ../../

# Filenames or directories (including fragments) to exclude from the analysis
EXCLUDE_LIST      = HostLoaderApp/ FATFs/ PetiteFATFs/ uip/

# Output message template for found warnings and errors
MESSAGE_TEMPLATE  = "{file}({line}): {severity} ({id}): {message}"

# Checks to suppress so that generated warnings are discarded
SUPPRESS_WARNINGS = variableScope unusedFunction missingInclude

all:
	cppcheck -q --std=c99 --check-config $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH)
	cppcheck -q -f --std=c99 --error-exitcode=1 --inline-suppr --enable=all $(SUPPRESS_WARNINGS:%=--suppress=%) --template $(MESSAGE_TEMPLATE) $(EXCLUDE_LIST:%=-i%) $(LUFA_ROOT_PATH)
	
%: