-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.dev.gcc
27 lines (24 loc) · 1.23 KB
/
Makefile.dev.gcc
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
CC=gcc
DEVFLAGS= -ggdb3 -pg -O0 -Wall -Wextra -pedantic -Wdeclaration-after-statement \
-Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes \
-Wno-missing-braces -Wno-missing-field-initializers -Wformat=2 \
-Wswitch-default -Wswitch-enum -Wcast-align -Wpointer-arith \
-Wbad-function-cast -Wstrict-overflow=5 -Wstrict-prototypes -Winline \
-Wundef -Wnested-externs -Wcast-qual -Wunreachable-code \
-Wlogical-op -Wfloat-equal -Wstrict-aliasing=2 -Wredundant-decls \
-Wold-style-definition -Wwrite-strings \
-fno-omit-frame-pointer -ffloat-store -fno-common -fstrict-aliasing \
-fprofile-arcs -ftest-coverage -Wp,-D_FORTIFY_SOURCE=2 \
-Winit-self -Wpacked -Wmissing-declarations -Wmissing-format-attribute \
-Wmissing-noreturn -Wnested-externs -Wsign-compare -Wunsafe-loop-optimizations \
-Werror-implicit-function-declaration -Wmissing-include-dirs -Wmissing-field-initializers \
-Wvolatile-register-var -Wdisabled-optimization -Wsign-conversion \
-Wno-long-long -Winvalid-pch -Wlogical-op -Wunused-result -Wdisabled-optimization
CFLAGS=$(DEVFLAGS) $(EXTRACFLAGS) -c
LDFLAGS=$(DEVFLAGS) $(EXTRALDFLAGS) -lgcov
OBJ=$(SRC:.c=.o)
all: $(SRC) $(EXE)
$(EXE): $(OBJ)
$(CC) $(OBJ) -o $@ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) $< -o $@