Added 'linty' target for make
"make linty" does lots of error checking while compiling. Simplified the standard make's CFLAGS. Cleaned up code to eliminate resulting warnings generated by "make linty".
This commit is contained in:
parent
d92da99106
commit
d844c2a391
6 changed files with 20 additions and 19 deletions
7
Makefile
7
Makefile
|
@ -25,9 +25,7 @@
|
|||
VERS=1.0
|
||||
|
||||
CC?=gcc
|
||||
CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic -Wextra -g
|
||||
CCFLAGS+=-Wstrict-prototypes
|
||||
CCFLAGS+=-Wmissing-prototypes
|
||||
CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wpedantic
|
||||
LIBS=
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
|
@ -118,5 +116,8 @@ refresh: advent.html
|
|||
|
||||
dist: advent-$(VERS).tar.gz
|
||||
|
||||
linty: CCFLAGS += -W -Wall -Wextra -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wfloat-equal -Wcast-align -Wwrite-strings -Waggregate-return -Wcast-qual -Wswitch-enum -Wwrite-strings -Wunreachable-code -Winit-self -Wpointer-arith -O2
|
||||
linty: advent
|
||||
|
||||
debug: CCFLAGS += -O0 --coverage -g
|
||||
debug: advent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue