1
1
OPT_DEBUG=-O0 -g -Wall -Wextra -Werror -I.
2
2
OPT_FAST=-O3 -DHTTP_PARSER_STRICT=0 -I.
8
10
test_g: http_parser_g.o test_g.o
9
gcc $(OPT_DEBUG) http_parser_g.o test_g.o -o $@
11
test_g.o: test.c Makefile
12
gcc $(OPT_DEBUG) -c test.c -o $@
14
test.o: test.c Makefile
15
gcc $(OPT_FAST) -c test.c -o $@
11
$(CC) $(OPT_DEBUG) http_parser_g.o test_g.o -o $@
13
test_g.o: test.c http_parser.h Makefile
14
$(CC) $(OPT_DEBUG) -c test.c -o $@
16
test.o: test.c http_parser.h Makefile
17
$(CC) $(OPT_FAST) -c test.c -o $@
17
19
http_parser_g.o: http_parser.c http_parser.h Makefile
18
gcc $(OPT_DEBUG) -c http_parser.c -o $@
20
$(CC) $(OPT_DEBUG) -c http_parser.c -o $@
20
22
test-valgrind: test_g
23
25
http_parser.o: http_parser.c http_parser.h Makefile
24
gcc $(OPT_FAST) -c http_parser.c
26
$(CC) $(OPT_FAST) -c http_parser.c
26
test_fast: http_parser.o test.c
27
gcc $(OPT_FAST) http_parser.o test.c -o $@
28
test_fast: http_parser.o test.c http_parser.h
29
$(CC) $(OPT_FAST) http_parser.o test.c -o $@
29
31
test-run-timed: test_fast
30
32
while(true) do time ./test_fast > /dev/null; done