diff --git a/.gitmodules b/.gitmodules index 1eb41ce..b177dee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,3 +5,6 @@ [submodule "runtime/jsmn"] path = runtime/jsmn url = https://github.com/zserge/jsmn.git +[submodule "runtime/http-parser"] + path = runtime/http-parser + url = https://github.com/nodejs/http-parser.git diff --git a/runtime/Makefile b/runtime/Makefile index 940fa91..5332ca6 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -31,6 +31,12 @@ JSMN=jsmn JSMNINC=-I${JSMN} JSMNCFLAGS=${JSMNINC} -DJSMN_STATIC -DJSMN_STRICT +HTTPPARSE=http-parser +HTTPPARSEINC=-I${HTTPPARSE} +HTTPPARSESRC=${HTTPPARSE}/http_parser.c +HTTPPARSECFLAGS=${HTTPPARSEINC} +CFILES += ${HTTPPARSESRC} + ifeq ($(USE_MEM),USE_MEM_GENERIC) CFILES += ${RTDIR}/memory/generic.c else ifeq ($(USE_MEM),USE_MEM_VM) @@ -42,7 +48,7 @@ all: clean runtime tools runtime: @echo "Compiling runtime" @mkdir -p bin/ - @${CC} ${CFLAGS} ${LDFLAGS} ${CFILES} ${JSMNCFLAGS} -L/usr/lib/ -luv $^ -o ${RUNTIME} + @${CC} ${CFLAGS} ${LDFLAGS} ${CFILES} ${JSMNCFLAGS} ${HTTPPARSECFLAGS} -L/usr/lib/ -luv $^ -o ${RUNTIME} tools: # @echo "Compiling tools" diff --git a/runtime/http-parser b/runtime/http-parser new file mode 160000 index 0000000..28f3c35 --- /dev/null +++ b/runtime/http-parser @@ -0,0 +1 @@ +Subproject commit 28f3c35c215ffbe0241685901338fad484660454