-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (62 loc) · 1.14 KB
/
Makefile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
LDLIBS += -lnet -lpcap
TARGET = pctest
all: $(TARGET)
clean:
rm -f $(TARGET)
test: $(TARGET)
./tcp
ifneq "$(PICKY)" "0"
NITPICKY_WARNINGS = \
-W \
-Waggregate-return \
-Wall \
-Wbad-function-cast \
-Wcast-align \
-Wcast-qual \
-Wchar-subscripts \
-Wcomment \
-Wdisabled-optimization \
-Wendif-labels \
-Werror \
-Wfloat-equal \
-Wformat=2 \
-Wimplicit \
-Winline \
-Wmain \
-Wmissing-braces \
-Wmissing-declarations \
-Wmissing-format-attribute \
-Wmissing-noreturn \
-Wmissing-prototypes \
-Wnested-externs \
-Wnonnull \
-Wpadded \
-Wparentheses \
-Wpointer-arith \
-Wredundant-decls \
-Wreturn-type \
-Wsequence-point \
-Wshadow \
-Wsign-compare \
-Wstrict-aliasing \
-Wstrict-prototypes \
-Wswitch \
-Wswitch-enum \
-Wtrigraphs \
-Wundef
ifeq "$(DEBUG)" ""
NITPICKY_WARNINGS += -Wuninitialized
endif
NITPICKY_WARNINGS += \
-Wunknown-pragmas \
-Wunused \
-Wwrite-strings \
-pedantic \
-std=c99 \
CFLAGS += $(NITPICKY_WARNINGS)
endif
ifneq "$(DEBUG)" ""
CFLAGS += -g3 -O0 -funit-at-a-time
else
CFLAGS += -O3 -fno-strict-aliasing
endif