|
|
@ -10,7 +10,7 @@ CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)
|
|
|
|
CFLAGS += -Wall -Wextra -Werror
|
|
|
|
CFLAGS += -Wall -Wextra -Werror
|
|
|
|
CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
|
|
|
|
CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
|
|
|
|
CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
|
|
|
|
CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)
|
|
|
|
|
|
|
|
CFLAGS_LIB = $(CFLAGS_FAST) -fPIC
|
|
|
|
|
|
|
|
|
|
|
|
test: test_g test_fast
|
|
|
|
test: test_g test_fast
|
|
|
|
./test_g
|
|
|
|
./test_g
|
|
|
@ -40,6 +40,12 @@ test-run-timed: test_fast
|
|
|
|
test-valgrind: test_g
|
|
|
|
test-valgrind: test_g
|
|
|
|
valgrind ./test_g
|
|
|
|
valgrind ./test_g
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libhttp_parser.o: http_parser.c http_parser.h Makefile
|
|
|
|
|
|
|
|
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
library: libhttp_parser.o
|
|
|
|
|
|
|
|
$(CC) -shared -o libhttp_parser.so libhttp_parser.o
|
|
|
|
|
|
|
|
|
|
|
|
package: http_parser.o
|
|
|
|
package: http_parser.o
|
|
|
|
$(AR) rcs libhttp_parser.a http_parser.o
|
|
|
|
$(AR) rcs libhttp_parser.a http_parser.o
|
|
|
|
|
|
|
|
|
|
|
@ -47,6 +53,6 @@ tags: http_parser.c http_parser.h test.c
|
|
|
|
ctags $^
|
|
|
|
ctags $^
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
clean:
|
|
|
|
rm -f *.o *.a test test_fast test_g http_parser.tar tags
|
|
|
|
rm -f *.o *.a test test_fast test_g http_parser.tar tags libhttp_parser.so libhttp_parser.o
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean package test-run test-run-timed test-valgrind
|
|
|
|
.PHONY: clean package test-run test-run-timed test-valgrind
|
|
|
|