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