|
|
@ -1,30 +1,32 @@
|
|
|
|
OPT_DEBUG=-O0 -g -Wall -Wextra -Werror -I.
|
|
|
|
OPT_DEBUG=-O0 -g -Wall -Wextra -Werror -I.
|
|
|
|
OPT_FAST=-O3 -DHTTP_PARSER_STRICT=0 -I.
|
|
|
|
OPT_FAST=-O3 -DHTTP_PARSER_STRICT=0 -I.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CC?=gcc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test: test_g
|
|
|
|
test: test_g
|
|
|
|
./test_g
|
|
|
|
./test_g
|
|
|
|
|
|
|
|
|
|
|
|
test_g: http_parser_g.o test_g.o
|
|
|
|
test_g: http_parser_g.o test_g.o
|
|
|
|
gcc $(OPT_DEBUG) http_parser_g.o test_g.o -o $@
|
|
|
|
$(CC) $(OPT_DEBUG) http_parser_g.o test_g.o -o $@
|
|
|
|
|
|
|
|
|
|
|
|
test_g.o: test.c http_parser.h Makefile
|
|
|
|
test_g.o: test.c http_parser.h Makefile
|
|
|
|
gcc $(OPT_DEBUG) -c test.c -o $@
|
|
|
|
$(CC) $(OPT_DEBUG) -c test.c -o $@
|
|
|
|
|
|
|
|
|
|
|
|
test.o: test.c http_parser.h Makefile
|
|
|
|
test.o: test.c http_parser.h Makefile
|
|
|
|
gcc $(OPT_FAST) -c test.c -o $@
|
|
|
|
$(CC) $(OPT_FAST) -c test.c -o $@
|
|
|
|
|
|
|
|
|
|
|
|
http_parser_g.o: http_parser.c http_parser.h Makefile
|
|
|
|
http_parser_g.o: http_parser.c http_parser.h Makefile
|
|
|
|
gcc $(OPT_DEBUG) -c http_parser.c -o $@
|
|
|
|
$(CC) $(OPT_DEBUG) -c http_parser.c -o $@
|
|
|
|
|
|
|
|
|
|
|
|
test-valgrind: test_g
|
|
|
|
test-valgrind: test_g
|
|
|
|
valgrind ./test_g
|
|
|
|
valgrind ./test_g
|
|
|
|
|
|
|
|
|
|
|
|
http_parser.o: http_parser.c http_parser.h Makefile
|
|
|
|
http_parser.o: http_parser.c http_parser.h Makefile
|
|
|
|
gcc $(OPT_FAST) -c http_parser.c
|
|
|
|
$(CC) $(OPT_FAST) -c http_parser.c
|
|
|
|
|
|
|
|
|
|
|
|
test_fast: http_parser.o test.c http_parser.h
|
|
|
|
test_fast: http_parser.o test.c http_parser.h
|
|
|
|
gcc $(OPT_FAST) http_parser.o test.c -o $@
|
|
|
|
$(CC) $(OPT_FAST) http_parser.o test.c -o $@
|
|
|
|
|
|
|
|
|
|
|
|
test-run-timed: test_fast
|
|
|
|
test-run-timed: test_fast
|
|
|
|
while(true) do time ./test_fast > /dev/null; done
|
|
|
|
while(true) do time ./test_fast > /dev/null; done
|
|
|
|