parent
4226a8f63b
commit
4536312215
@ -1,30 +1,31 @@
|
|||||||
OPT=-O0 -g -Wall -Wextra -Werror
|
OPT_DEBUG=-O0 -g -Wall -Wextra -Werror
|
||||||
#OPT=-O3 -DHTTP_PARSER_STRICT=0
|
OPT_FAST=-O3 -DHTTP_PARSER_STRICT=0
|
||||||
|
|
||||||
test: http_parser.o test.c
|
|
||||||
gcc $(OPT) http_parser.o test.c -o $@
|
|
||||||
|
|
||||||
test-run: test
|
http_parser_g.o: http_parser.c http_parser.h Makefile
|
||||||
./test
|
gcc $(OPT_DEBUG) -c http_parser.c
|
||||||
|
|
||||||
|
test_g: http_parser_g.o test.c
|
||||||
|
gcc $(OPT_DEBUG) http_parser.o test.c -o $@
|
||||||
|
|
||||||
|
test-run: test_g
|
||||||
|
./test_g
|
||||||
|
|
||||||
test-run-timed: test
|
|
||||||
time ./test > /dev/null
|
|
||||||
|
|
||||||
http_parser.o: http_parser.c http_parser.h Makefile
|
http_parser.o: http_parser.c http_parser.h Makefile
|
||||||
gcc $(OPT) -c http_parser.c
|
gcc $(OPT_FAST) -c http_parser.c
|
||||||
|
|
||||||
|
test: http_parser.o test.c
|
||||||
|
gcc $(OPT_FAST) http_parser.o test.c -o $@
|
||||||
|
|
||||||
|
test-run-timed: test
|
||||||
|
while(true) do time ./test > /dev/null; done
|
||||||
|
|
||||||
|
|
||||||
tags: http_parser.c http_parser.h test.c
|
tags: http_parser.c http_parser.h test.c
|
||||||
ctags $^
|
ctags $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o http_parser.c test http_parser.tar
|
rm -f *.o http_parser.c test test_g http_parser.tar
|
||||||
|
|
||||||
package: http_parser.c
|
|
||||||
@rm -rf /tmp/http_parser && mkdir /tmp/http_parser && \
|
|
||||||
cp LICENSE README.md Makefile http_parser.c \
|
|
||||||
http_parser.h test.c /tmp/http_parser && \
|
|
||||||
cd /tmp && \
|
|
||||||
tar -cf http_parser.tar http_parser/
|
|
||||||
@echo /tmp/http_parser.tar
|
|
||||||
|
|
||||||
.PHONY: clean package test-run test-run-timed
|
.PHONY: clean package test-run test-run-timed
|
||||||
|
Loading…
Reference in new issue