moved jsmn, http-parser to thirdparty/ and pulled in ck submodule there too

main
phani 5 years ago
parent 37db945637
commit cfa458c5b9

3
.gitignore vendored

@ -62,3 +62,6 @@ runtime/tests/tmp/
# Symlinks
Dockerfile
# Others
runtime/thirdparty/dist/

17
.gitmodules vendored

@ -3,8 +3,17 @@
url = https://github.com/gparmer/silverfish.git
ignore = dirty
[submodule "runtime/jsmn"]
path = runtime/jsmn
url = https://github.com/zserge/jsmn.git
path = runtime/thirdparty/jsmn
url = https://github.com/gwsystems/jsmn.git
[submodule "runtime/http-parser"]
path = runtime/http-parser
url = https://github.com/nodejs/http-parser.git
path = runtime/thirdparty/http-parser
url = https://github.com/gwsystems/http-parser.git
[submodule "runtime/thirdparty/http-parser"]
path = runtime/thirdparty/http-parser
url = https://github.com/gwsystems/http-parser.git
[submodule "runtime/thirdparty/jsmn"]
path = runtime/thirdparty/jsmn
url = https://github.com/gwsystems/jsmn.git
[submodule "runtime/thirdparty/ck"]
path = runtime/thirdparty/ck
url = https://github.com/gwsystems/ck.git

@ -28,16 +28,17 @@ CFLAGS += -DNCORES=${NCORES_CONF}
CFLAGS += -DPAGE_SIZE=$(shell getconf PAGESIZE)
MAKE= make --no-print-directory
THIRDPARTY=thirdparty
JSMN=jsmn
JSMNINC=-I${JSMN}
JSMNCFLAGS=${JSMNINC} -DJSMN_STATIC -DJSMN_STRICT
THIRDPARTY_DIST=${THIRDPARTY}/dist/
THIRDPARTY_INC=${THIRDPARTY_DIST}/include/
THIRDPARTY_LIB=${THIRDPARTY_DIST}/lib/
LDFLAGS += -L${THIRDPARTY_LIB}
CFLAGS += -I${THIRDPARTY_INC}
HTTPPARSE=http-parser
HTTPPARSEINC=-I${HTTPPARSE}
HTTPPARSESRC=${HTTPPARSE}/http_parser.c
HTTPPARSECFLAGS=${HTTPPARSEINC}
CFILES += ${HTTPPARSESRC}
JSMNCFLAGS=-DJSMN_STATIC -DJSMN_STRICT
HTTPPARSEOBJ=${THIRDPARTY_LIB}/http_parser.o
CFILES += ${HTTPPARSEOBJ}
ifeq ($(USE_MEM),USE_MEM_GENERIC)
CFILES += ${RTDIR}/memory/generic.c
@ -45,13 +46,17 @@ else ifeq ($(USE_MEM),USE_MEM_VM)
CFILES += ${RTDIR}/memory/64bit_nix.c
endif
all: clean runtime #tools
all: clean runtime
runtime:
@echo "Compiling runtime"
@mkdir -p bin/
@${CC} ${CFLAGS} ${LDFLAGS} ${CFILES} ${JSMNCFLAGS} ${HTTPPARSECFLAGS} -L/usr/lib/ -luv $^ -o ${RUNTIME}
thirdparty:
@echo "Compiling thirdparty"
@${MAKE} -C thirdparty build
tools:
# @echo "Compiling tools"
@${MAKE} -C tools
@ -61,11 +66,14 @@ clean:
@echo "Cleaning up runtime"
@rm -f ${RUNTIME}
# @echo "Cleaning up tools"
@${MAKE} -C tools clean
# @${MAKE} -C tools clean
distclean: clean
@${MAKE} -C thirdparty clean
fetch:
@git submodule update --init --recursive
init: fetch clean runtime tools
init: fetch clean thirdparty runtime
.PHONY: all init clean fetch libuv runtime tools
.PHONY: all init clean fetch thirdparty runtime tools

@ -1 +0,0 @@
Subproject commit 28f3c35c215ffbe0241685901338fad484660454

@ -1 +0,0 @@
Subproject commit 85695f3d5903b1cd5b4030efe50db3b4f5f3c928

@ -0,0 +1,26 @@
CURR_DIR= $(shell pwd)
DIST_PREFIX=${CURR_DIR}/dist/
all: clean build
build: ck jsmn http-parser
ck:
mkdir -p ${DIST_PREFIX}
cd ck; ./configure --cores=$(shell getconf _NPROCESSORS_CONF) --prefix=${DIST_PREFIX}
make -C ck all
make -C ck install
http-parser: http-parser/http_parser.c
mkdir -p ${DIST_PREFIX}/lib/
cd http-parser; $(CC) $(CFLAGS) -I. -c http_parser.c; mv http_parser.o ${DIST_PREFIX}/lib/; cp http_parser.h ${DIST_PREFIX}/include/
jsmn:
mkdir -p ${DIST_PREFIX}/include/
cp jsmn/jsmn.h ${DIST_PREFIX}/include/
clean:
make -C ck uninstall
rm -rf ${DIST_PREFIX}
.PHONY: clean all build ck jsmn http-parser

@ -0,0 +1 @@
Subproject commit 94f37128144287d35274225f99da4927d3f41ab4

@ -0,0 +1 @@
Subproject commit 2343fd6b5214b2ded2cdcf76de2bf60903bb90cd

@ -0,0 +1 @@
Subproject commit 053d3cd29200edb1bfd181d917d140c16c1f8834
Loading…
Cancel
Save