Remove Makefiles
This commit is contained in:
parent
490ce840f9
commit
a3aa8b60bb
21
Makefile
21
Makefile
@ -1,21 +0,0 @@
|
||||
|
||||
all:
|
||||
${MAKE} -C src all
|
||||
|
||||
clean:
|
||||
${MAKE} -C src clean
|
||||
${MAKE} -C test clean
|
||||
|
||||
partial-clean:
|
||||
${MAKE} -C src partial-clean
|
||||
${MAKE} -C test clean
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
${MAKE} -C test
|
||||
|
||||
build-deps:
|
||||
@./scripts/install_build_deps.sh all
|
||||
|
||||
docker-image:
|
||||
@./scripts/create_docker_image.sh
|
323
src/Makefile
323
src/Makefile
@ -1,323 +0,0 @@
|
||||
|
||||
TZPROTOCOLPACKER:=../tezos-protocol-packer
|
||||
TZCOMPILER:=../tezos-protocol-compiler
|
||||
TZNODE:=../tezos-node
|
||||
TZCLIENT:=../tezos-client
|
||||
|
||||
all: ${TZCOMPILER} ${TZNODE} ${TZCLIENT}
|
||||
|
||||
-include Makefile.local
|
||||
include Makefile.config
|
||||
include Makefile.files
|
||||
|
||||
NODEPS :=
|
||||
|
||||
############################################################################
|
||||
## Protocol environment
|
||||
############################################################################
|
||||
|
||||
.INTERMEDIATE: ${SIGS_PACKER}
|
||||
.SECONDARY: ${PACKED_SIGS_V1}.ml
|
||||
|
||||
ENVIRONMENT_OBJS := ${PACKED_SIGS_V1}.cmi ${PACKED_SIGS_V1}.cmx
|
||||
|
||||
${ENVIRONMENT_OBJS}: PACKAGES=
|
||||
${ENVIRONMENT_OBJS}: SOURCE_DIRECTORIES=${ENVIRONMENT_DIRECTORIES}
|
||||
${ENVIRONMENT_OBJS}: TARGET="(tezos_protocol_environment_sigs_v1.cmx)"
|
||||
${ENVIRONMENT_OBJS}: OPENED_MODULES=
|
||||
|
||||
${SIGS_PACKER}: ${SIGS_PACKER}.ml
|
||||
@echo LINK $(notdir $@)
|
||||
@$(OCAMLOPT) -o $@ $^
|
||||
|
||||
${PACKED_SIGS_V1}.ml: \
|
||||
${SIGS_PACKER} $(PROTOCOL_ENV_INTFS)
|
||||
@echo GENERATING $(notdir $@)
|
||||
@${SIGS_PACKER} $(PROTOCOL_ENV_INTFS) > $@
|
||||
|
||||
${PACKED_SIGS_V1}.cmi: ${PACKED_SIGS_V1}.cmx
|
||||
${PACKED_SIGS_V1}.cmx: EXTRA_OCAMLFLAGS = -nopervasives
|
||||
|
||||
partial-clean::
|
||||
rm -f ${SIGS_PACKER}
|
||||
rm -f ${PACKED_SIGS_V1}.ml
|
||||
|
||||
|
||||
############################################################################
|
||||
## Protocol compiler (also embedded in the node)
|
||||
############################################################################
|
||||
|
||||
COMPILER_OBJS := \
|
||||
${COMPILER_IMPLS:.ml=.cmx} ${COMPILER_IMPLS:.ml=.ml.deps} \
|
||||
${COMPILER_LIB_IMPLS:.ml=.cmx} ${COMPILER_LIB_IMPLS:.ml=.ml.deps} \
|
||||
${COMPILER_LIB_INTFS:.mli=.cmi} ${COMPILER_LIB_INTFS:.mli=.mli.deps} \
|
||||
${TZCOMPILER}
|
||||
${COMPILER_OBJS}: PACKAGES=${COMPILER_PACKAGES}
|
||||
${COMPILER_OBJS}: SOURCE_DIRECTORIES=${COMPILER_SOURCE_DIRECTORIES}
|
||||
${COMPILER_OBJS}: TARGET="(compiler.cmxa)"
|
||||
${COMPILER_OBJS}: OPENED_MODULES=${COMPILER_OPENED_MODULES}
|
||||
|
||||
compiler/registerer.cmi: EXTRA_OCAMLFLAGS = -opaque
|
||||
|
||||
.INTERMEDIATE: compiler/embedded_cmis.ml
|
||||
compiler/embedded_cmis.cmx: compiler/embedded_cmis.cmi
|
||||
|
||||
compiler/embedded_cmis.ml: ${COMPILER_EMBEDDED_CMIS}
|
||||
@echo OCAMLRES ${TARGET} $(notdir $@)
|
||||
@$(OCAMLRES) -format ocaml -o $@ $^
|
||||
|
||||
compiler.cmxa: ${COMPILER_LIB_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} ${OCAMLFLAGS} -a -o $@ $^
|
||||
|
||||
${TZCOMPILER}: minutils.cmxa utils.cmxa compiler.cmxa ${COMPILER_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@$(OCAMLOPT) -linkpkg $(patsubst %, -package %, $(COMPILER_PACKAGES)) -o $@ $^
|
||||
|
||||
partial-clean::
|
||||
rm -f compiler/embedded_cmis.ml
|
||||
|
||||
clean::
|
||||
rm -f ${TZCOMPILER}
|
||||
|
||||
|
||||
############################################################################
|
||||
## Minimal utils library compatible with js_of_ocaml
|
||||
############################################################################
|
||||
|
||||
MINUTILS_OBJS := \
|
||||
${MINUTILS_LIB_IMPLS:.ml=.cmx} ${MINUTILS_LIB_IMPLS:.ml=.ml.deps} \
|
||||
${MINUTILS_LIB_INTFS:.mli=.cmi} ${MINUTILS_LIB_INTFS:.mli=.mli.deps}
|
||||
${MINUTILS_OBJS}: PACKAGES=${MINUTILS_PACKAGES}
|
||||
${MINUTILS_OBJS}: SOURCE_DIRECTORIES=${MINUTILS_SOURCE_DIRECTORIES}
|
||||
${MINUTILS_OBJS}: TARGET="(minutils.cmxa)"
|
||||
${MINUTILS_OBJS}: OPENED_MODULES=${MINUTILS_OPENED_MODULES}
|
||||
|
||||
minutils.cmxa: ${MINUTILS_LIB_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} ${OCAMLFLAGS} -a -o $@ $^
|
||||
|
||||
MINUTILS_OBJS_BYTECODE := \
|
||||
${MINUTILS_LIB_IMPLS:.ml=.cmo} ${MINUTILS_LIB_IMPLS:.ml=.ml.deps.byte}
|
||||
${MINUTILS_OBJS_BYTECODE}: PACKAGES=${MINUTILS_PACKAGES}
|
||||
${MINUTILS_OBJS_BYTECODE}: SOURCE_DIRECTORIES=${MINUTILS_SOURCE_DIRECTORIES}
|
||||
${MINUTILS_OBJS_BYTECODE}: TARGET="(minutils.cma)"
|
||||
${MINUTILS_OBJS_BYTECODE}: OPENED_MODULES=${MINUTILS_OPENED_MODULES}
|
||||
|
||||
minutils.cma: ${MINUTILS_LIB_IMPLS:.ml=.cmo}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLC} ${OCAMLFLAGS} -a -o $@ $^
|
||||
|
||||
############################################################################
|
||||
## Utils library
|
||||
############################################################################
|
||||
|
||||
UTILS_OBJS := \
|
||||
${UTILS_LIB_IMPLS:.ml=.cmx} ${UTILS_LIB_IMPLS:.ml=.ml.deps} \
|
||||
${UTILS_LIB_INTFS:.mli=.cmi} ${UTILS_LIB_INTFS:.mli=.mli.deps}
|
||||
${UTILS_OBJS}: PACKAGES=${UTILS_PACKAGES}
|
||||
${UTILS_OBJS}: SOURCE_DIRECTORIES=${UTILS_SOURCE_DIRECTORIES}
|
||||
${UTILS_OBJS}: TARGET="(utils.cmxa)"
|
||||
${UTILS_OBJS}: OPENED_MODULES=${UTILS_OPENED_MODULES}
|
||||
|
||||
utils.cmxa: ${UTILS_LIB_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} ${OCAMLFLAGS} -a -o $@ $^
|
||||
|
||||
utils.top: DEVFLAGS=
|
||||
utils.top:
|
||||
( $(patsubst %, echo "#require \"%\";;" ; ,${UTILS_PACKAGES}) ) > .ocamlinit.utils
|
||||
( $(patsubst %, echo "#mod_use \"%\";;" ; ,${MINUTILS_LIB_IMPLS} ${UTILS_LIB_IMPLS}) ) >> .ocamlinit.utils
|
||||
utop -init .ocamlinit.utils ${UTOPFLAGS}
|
||||
|
||||
partial-clean::
|
||||
-rm -f .ocamlinit.utils
|
||||
|
||||
############################################################################
|
||||
## Node program
|
||||
############################################################################
|
||||
|
||||
NODE_OBJS := \
|
||||
${NODE_IMPLS:.ml=.cmx} ${NODE_IMPLS:.ml=.ml.deps} \
|
||||
${NODE_INTFS:.mli=.cmi} ${NODE_INTFS:.mli=.mli.deps} \
|
||||
${NODE_LIB_IMPLS:.ml=.cmx} ${NODE_LIB_IMPLS:.ml=.ml.deps} \
|
||||
${NODE_LIB_INTFS:.mli=.cmi} ${NODE_LIB_INTFS:.mli=.mli.deps} \
|
||||
${TZNODE}
|
||||
${NODE_OBJS}: PACKAGES=${NODE_PACKAGES}
|
||||
${NODE_OBJS}: SOURCE_DIRECTORIES=${NODE_SOURCE_DIRECTORIES}
|
||||
${NODE_OBJS}: TARGET="(node.cmxa)"
|
||||
${NODE_OBJS}: OPENED_MODULES=${NODE_OPENED_MODULES}
|
||||
|
||||
${NODE_IMPLS:.ml=.cmx} ${NODE_IMPLS:.ml=.ml.deps} \
|
||||
${NODE_INTFS:.mli=.cmi} ${NODE_INTFS:.mli=.mli.deps}: TARGET="(tezos-node)"
|
||||
|
||||
node/updater/environment.cmi: node/updater/environment.cmx
|
||||
|
||||
node.cmxa: ${NODE_LIB_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} ${OCAMLFLAGS} -a -o $@ $^
|
||||
|
||||
${NODE_IMPLS:.ml=.cmx}: ${EMBEDDED_NODE_PROTOCOLS}
|
||||
${TZNODE}: minutils.cmxa utils.cmxa compiler.cmxa node.cmxa ${EMBEDDED_NODE_PROTOCOLS} ${NODE_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
partial-clean::
|
||||
-rm -f proto/*.cm* proto/*.a
|
||||
|
||||
node.top: DEVFLAGS=
|
||||
node.top: ${MINUTILS_LIB_IMPLS} ${UTILS_LIB_IMPLS} ${COMPILER_LIB_IMPLS} ${NODE_LIB_IMPLS}
|
||||
( $(patsubst %, echo "#require \"%\";;" ; ,${NODE_PACKAGES}) ) > .ocamlinit.node
|
||||
( $(patsubst %, echo "#mod_use \"%\";;" ; ,${MINUTILS_LIB_IMPLS} ${UTILS_LIB_IMPLS}) ) >> .ocamlinit.node
|
||||
( $(patsubst %, echo "open %;;" ; ,${NODE_OPENED_MODULES}) ) >> .ocamlinit.node
|
||||
( $(patsubst %, echo "#mod_use \"%\";;" ; ,${COMPILER_LIB_IMPLS} ${NODE_LIB_IMPLS}) ) >> .ocamlinit.node
|
||||
utop -I +compiler-libs ocamlcommon.cma -init .ocamlinit.node ${UTOPFLAGS}
|
||||
## HACK: the explicit loading of `ocamlcommon.cma` is here to
|
||||
## circumvent a bug in utop. https://github.com/diml/utop/issues/213
|
||||
|
||||
clean::
|
||||
rm -f ${TZNODE}
|
||||
|
||||
|
||||
partial-clean::
|
||||
-rm -f .ocamlinit.node
|
||||
|
||||
|
||||
############################################################################
|
||||
## Client program
|
||||
############################################################################
|
||||
|
||||
CLIENT_OBJS := \
|
||||
${CLIENT_IMPLS:.ml=.cmx} ${CLIENT_IMPLS:.ml=.ml.deps} \
|
||||
${CLIENT_LIB_IMPLS:.ml=.cmx} ${CLIENT_LIB_IMPLS:.ml=.ml.deps} \
|
||||
${CLIENT_LIB_INTFS:.mli=.cmi} ${CLIENT_LIB_INTFS:.mli=.mli.deps} \
|
||||
${TZCLIENT}
|
||||
${CLIENT_OBJS}: PACKAGES=${CLIENT_PACKAGES}
|
||||
${CLIENT_OBJS}: SOURCE_DIRECTORIES=${CLIENT_SOURCE_DIRECTORIES}
|
||||
${CLIENT_OBJS}: OPENED_MODULES=${CLIENT_OPENED_MODULES}
|
||||
|
||||
${CLIENT_LIB_IMPLS:.ml=.cmx} ${CLIENT_LIB_IMPLS:.ml=.ml.deps}: TARGET="(client.cmxa)"
|
||||
${CLIENT_LIB_INTFS:.mli=.cmi} ${CLIENT_LIB_INTFS:.mli=.mli.deps}: TARGET="(client.cmxa)"
|
||||
|
||||
client.cmxa: ${CLIENT_LIB_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} ${OCAMLFLAGS} -a -o $@ $^
|
||||
|
||||
${EMBEDDED_CLIENT_VERSIONS}: client.cmxa ${EMBEDDED_CLIENT_PROTOCOLS}
|
||||
${CLIENT_IMPLS:.ml=.cmx}: ${EMBEDDED_CLIENT_VERSIONS}
|
||||
|
||||
${TZCLIENT}: minutils.cmxa utils.cmxa compiler.cmxa node.cmxa \
|
||||
client.cmxa \
|
||||
${EMBEDDED_CLIENT_PROTOCOLS} \
|
||||
${EMBEDDED_CLIENT_VERSIONS} \
|
||||
${CLIENT_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
-rm -f ${TZCLIENT}
|
||||
|
||||
############################################################################
|
||||
## Generic rules
|
||||
############################################################################
|
||||
|
||||
%.cmx: %.ml
|
||||
@echo OCAMLOPT ${TARGET} $(notdir $@)
|
||||
@$(OCAMLOPT) ${OCAMLFLAGS} -c $<
|
||||
|
||||
%.cmo: %.ml
|
||||
@echo OCAMLC ${TARGET} $(notdir $@)
|
||||
@$(OCAMLC) ${OCAMLFLAGS} -c $<
|
||||
|
||||
%.cmi: %.mli
|
||||
@echo OCAMLOPT ${TARGET} $(notdir $@)
|
||||
@$(OCAMLOPT) ${OCAMLFLAGS} -c $<
|
||||
|
||||
## Cleaning
|
||||
|
||||
.PHONY: clean partial-clean
|
||||
clean:: partial-clean
|
||||
partial-clean::
|
||||
-find . \( -name \*.cm\* -or -name \*.cmp -or -name \*.out -or -name \*~ -or -name \*.o -or -name \*.a \) -delete
|
||||
|
||||
## Dependencies
|
||||
|
||||
NO_DEPS += \
|
||||
compiler/embedded_cmis.ml \
|
||||
compiler/embedded_cmis.mli
|
||||
compiler/embedded_cmis.cmx compiler/embedded_cmis.cmi: OPENED_MODULES=
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
include .depend
|
||||
endif
|
||||
DEPENDS := $(filter-out $(NO_DEPS), \
|
||||
$(MINUTILS_LIB_INTFS) $(MINUTILS_LIB_IMPLS) \
|
||||
$(UTILS_LIB_INTFS) $(UTILS_LIB_IMPLS) \
|
||||
${COMPILER_PRECOMPILED_INTFS} \
|
||||
$(COMPILER_LIB_INTFS) $(COMPILER_LIB_IMPLS) \
|
||||
$(COMPILER_INTFS) $(COMPILER_IMPLS) \
|
||||
$(NODE_LIB_INTFS) $(NODE_LIB_IMPLS) \
|
||||
$(NODE_INTFS) $(NODE_IMPLS) \
|
||||
$(CLIENT_LIB_INTFS) $(CLIENT_LIB_IMPLS) \
|
||||
$(CLIENT_INTFS) $(CLIENT_IMPLS) \
|
||||
$(ATTACKER_LIB_INTFS) $(ATTACKER_LIB_IMPLS) \
|
||||
$(ATTACKER_INTFS) $(ATTACKER_IMPLS) \
|
||||
)
|
||||
DEPENDS_BYTECODE := \
|
||||
$(filter-out $(NO_DEPS), $(MINUTILS_LIB_INTFS) $(MINUTILS_LIB_IMPLS))
|
||||
|
||||
predepend: ${PACKED_SIGS_V1}.ml
|
||||
compiler/tezos_compiler.cmo compiler/tezos_compiler.cmx: \
|
||||
compiler/embedded_cmis.cmi compiler/embedded_cmis.cmx
|
||||
|
||||
.SECONDARY: $(patsubst %,%.deps,${DEPENDS}) $(patsubst %,%.deps.byte,${DEPENDS_BYTECODE})
|
||||
.depend: $(patsubst %,%.deps,${DEPENDS}) $(patsubst %,%.deps.byte,${DEPENDS_BYTECODE})
|
||||
@cat $^ > .depend
|
||||
%.ml.deps: %.ml | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $^)
|
||||
@$(OCAMLDEP) -native $(INCLUDES) $^ > $@
|
||||
%.mli.deps: %.mli | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $^)
|
||||
@$(OCAMLDEP) -native $(INCLUDES) $^ > $@
|
||||
%.ml.deps.byte: %.ml | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $^)
|
||||
@$(OCAMLDEP) $(INCLUDES) $^ > $@
|
||||
%.mli.deps.byte: %.mli | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $^)
|
||||
@$(OCAMLDEP) $(INCLUDES) $^ > $@
|
||||
|
||||
partial-clean::
|
||||
-rm -f .depend
|
||||
-find . \( -name \*.mli.deps -or -name \*.ml.deps \) -delete
|
||||
-find . \( -name \*.mli.deps.byte -or -name \*.ml.deps.byte \) -delete
|
||||
|
||||
|
||||
## Embedded protocol modules
|
||||
|
||||
.SECONDEXPANSION:
|
||||
proto/tezos_embedded_protocol_%.cmx: \
|
||||
${TZCOMPILER} \
|
||||
proto/%/TEZOS_PROTOCOL \
|
||||
$$(wildcard proto/%/*.ml) \
|
||||
$$(wildcard proto/%/*.mli)
|
||||
@echo "TZCOMPILER (tezos_protocol_$*.cmx)"
|
||||
@${TZCOMPILER} -static ${DEVFLAGS} \
|
||||
proto/tezos_embedded_protocol_$* proto/$*
|
||||
|
||||
partial-clean::
|
||||
-rm -rf ${EMBEDDED_NODE_PROTOCOLS}
|
||||
|
||||
## Embedded client protocol modules
|
||||
|
||||
client/embedded/client_embedded_%.cmx: \
|
||||
$(patsubst %.ml, %.cmx, $(NODE_LIB_IMPLS) $(CLIENT_LIB_IMPLS)) \
|
||||
proto/tezos_embedded_protocol_%.cmx \
|
||||
$$(shell find client/embedded/% \( -name _tzbuild \) -prune -or \( -name \*.ml -print -or -name \*.mli -print \))
|
||||
@$(MAKE) -C client/embedded/$* ../client_embedded_$*.cmx
|
||||
|
||||
client/embedded/client_embedded_genesis.cmx: \
|
||||
client/embedded/client_embedded_alpha.cmx
|
||||
|
||||
partial-clean::
|
||||
-for d in $$(ls -d client/embedded/*/) ; do make clean -C $$d ; done
|
||||
-rm -f client/embedded/*.cm* client/embedded/*.o
|
@ -1,28 +0,0 @@
|
||||
|
||||
ifeq ($(strip ${COVERAGE}),yes)
|
||||
COVERAGEPKG := bisect_ppx
|
||||
endif
|
||||
|
||||
INCLUDES = \
|
||||
$(patsubst %, -I %, $(SOURCE_DIRECTORIES)) \
|
||||
$(patsubst %, -package %, $(PACKAGES)) \
|
||||
$(patsubst %, -open %, $(OPENED_MODULES))
|
||||
|
||||
ifneq ($(strip ${PRODUCTION}),yes)
|
||||
DEVFLAGS := -bin-annot -g
|
||||
endif
|
||||
|
||||
OCAMLFLAGS = \
|
||||
${DEVFLAGS} -thread -short-paths -safe-string -w +27-30-40@8 \
|
||||
${INCLUDES} \
|
||||
${EXTRA_OCAMLFLAGS}
|
||||
|
||||
UTOPFLAGS = $(filter-out -thread,${OCAMLFLAGS})
|
||||
|
||||
OCAMLC = ocamlfind ocamlc
|
||||
OCAMLOPT = ocamlfind ocamlopt
|
||||
OCAMLMKTOP = ocamlfind ocamlmktop
|
||||
OCAMLDEP = ocamlfind ocamldep
|
||||
OCAMLRES = ocp-ocamlres
|
||||
OCAMLLEX = ocamllex
|
||||
MENHIR = menhir
|
@ -1,419 +0,0 @@
|
||||
|
||||
SRCDIR ?= .
|
||||
|
||||
SIGS_PACKER:=environment/sigs_packer/sigs_packer
|
||||
PACKED_SIGS_V1:=environment/tezos_protocol_environment_sigs_v1
|
||||
|
||||
ENVIRONMENT_SOURCE_DIRECTORIES := \
|
||||
${SRCDIR}/environment
|
||||
|
||||
PROTOCOL_ENV_INTFS := \
|
||||
$(addprefix environment/v1/, \
|
||||
pervasives.mli \
|
||||
compare.mli \
|
||||
\
|
||||
array.mli list.mli bytes.mli string.mli \
|
||||
set.mli map.mli \
|
||||
int32.mli int64.mli \
|
||||
buffer.mli \
|
||||
format.mli \
|
||||
\
|
||||
z.mli \
|
||||
lwt_sequence.mli lwt.mli lwt_list.mli \
|
||||
\
|
||||
mBytes.mli \
|
||||
hex_encode.mli \
|
||||
\
|
||||
uri.mli \
|
||||
data_encoding.mli \
|
||||
error_monad.mli \
|
||||
logging.mli \
|
||||
time.mli \
|
||||
base58.mli \
|
||||
hash.mli \
|
||||
ed25519.mli \
|
||||
tezos_data.mli \
|
||||
persist.mli \
|
||||
context.mli \
|
||||
RPC.mli \
|
||||
\
|
||||
updater.mli \
|
||||
)
|
||||
|
||||
############################################################################
|
||||
## Minimal utils library compatible with js_of_ocaml
|
||||
############################################################################
|
||||
|
||||
MINUTILS_SOURCE_DIRECTORIES := \
|
||||
${SRCDIR}/minutils
|
||||
|
||||
MINUTILS_OPENED_MODULES :=
|
||||
|
||||
MINUTILS_LIB_INTFS := \
|
||||
minutils/mBytes.mli \
|
||||
minutils/hex_encode.mli \
|
||||
minutils/utils.mli \
|
||||
minutils/compare.mli \
|
||||
minutils/data_encoding.mli \
|
||||
minutils/RPC.mli \
|
||||
|
||||
MINUTILS_LIB_IMPLS := \
|
||||
minutils/mBytes.ml \
|
||||
minutils/hex_encode.ml \
|
||||
minutils/utils.ml \
|
||||
minutils/compare.ml \
|
||||
minutils/data_encoding.ml \
|
||||
minutils/RPC.ml \
|
||||
|
||||
MINUTILS_PACKAGES := \
|
||||
cstruct \
|
||||
lwt \
|
||||
ocplib-json-typed.bson \
|
||||
ocplib-resto.directory \
|
||||
$(COVERAGEPKG) \
|
||||
|
||||
############################################################################
|
||||
## Utils library
|
||||
############################################################################
|
||||
|
||||
UTILS_SOURCE_DIRECTORIES := \
|
||||
${MINUTILS_SOURCE_DIRECTORIES} \
|
||||
${SRCDIR}/utils
|
||||
|
||||
UTILS_OPENED_MODULES :=
|
||||
|
||||
UTILS_LIB_INTFS := \
|
||||
utils/base58.mli \
|
||||
utils/cli_entries.mli \
|
||||
utils/data_encoding_ezjsonm.mli \
|
||||
utils/crypto_box.mli \
|
||||
utils/time.mli \
|
||||
utils/hash.mli \
|
||||
utils/error_monad.mli \
|
||||
utils/lwt_exit.mli \
|
||||
utils/logging.mli \
|
||||
utils/lwt_utils.mli \
|
||||
utils/lwt_pipe.mli \
|
||||
utils/IO.mli \
|
||||
utils/moving_average.mli \
|
||||
utils/ring.mli \
|
||||
utils/watcher.mli \
|
||||
utils/tezos_data.mli \
|
||||
|
||||
UTILS_LIB_IMPLS := \
|
||||
utils/base58.ml \
|
||||
utils/error_monad_sig.ml \
|
||||
utils/error_monad.ml \
|
||||
utils/cli_entries.ml \
|
||||
utils/data_encoding_ezjsonm.ml \
|
||||
utils/time.ml \
|
||||
utils/hash.ml \
|
||||
utils/crypto_box.ml \
|
||||
utils/lwt_exit.ml \
|
||||
utils/logging.ml \
|
||||
utils/lwt_utils.ml \
|
||||
utils/lwt_pipe.ml \
|
||||
utils/IO.ml \
|
||||
utils/moving_average.ml \
|
||||
utils/ring.ml \
|
||||
utils/watcher.ml \
|
||||
utils/tezos_data.ml \
|
||||
|
||||
UTILS_PACKAGES := \
|
||||
${MINUTILS_PACKAGES} \
|
||||
zarith \
|
||||
base64 \
|
||||
calendar \
|
||||
ezjsonm \
|
||||
ipaddr.unix \
|
||||
lwt.unix \
|
||||
mtime.clock.os \
|
||||
nocrypto \
|
||||
sodium \
|
||||
zarith \
|
||||
$(COVERAGEPKG) \
|
||||
|
||||
|
||||
############################################################################
|
||||
## Node protocol compiler (also embedded in the main program)
|
||||
############################################################################
|
||||
|
||||
COMPILER_SOURCE_DIRECTORIES := \
|
||||
${ENVIRONMENT_SOURCE_DIRECTORIES} \
|
||||
${UTILS_SOURCE_DIRECTORIES} \
|
||||
${SRCDIR}/compiler
|
||||
|
||||
COMPILER_OPENED_MODULES := Tezos_data Hash
|
||||
|
||||
$(shell ocamlfind query stdlib)/camlinternalFormatBasics.cmi: \
|
||||
$(shell ocamlfind query stdlib)/camlinternalFormatBasics.mli
|
||||
@echo -n # do nothing...
|
||||
|
||||
COMPILER_EMBEDDED_CMIS := \
|
||||
$(shell ocamlfind query stdlib)/camlinternalFormatBasics.cmi \
|
||||
${PACKED_SIGS_V1}.cmi \
|
||||
compiler/registerer.cmi
|
||||
|
||||
COMPILER_IMPLS := \
|
||||
compiler_main.ml \
|
||||
|
||||
COMPILER_LIB_INTFS := \
|
||||
compiler/embedded_cmis.mli \
|
||||
compiler/registerer.mli \
|
||||
compiler/packer.mli \
|
||||
compiler/native.mli \
|
||||
|
||||
COMPILER_LIB_IMPLS := \
|
||||
compiler/embedded_cmis.ml \
|
||||
compiler/registerer.ml \
|
||||
compiler/packer.ml \
|
||||
compiler/native.ml \
|
||||
|
||||
COMPILER_IMPLS := \
|
||||
compiler_main.ml \
|
||||
|
||||
COMPILER_PACKAGES := \
|
||||
${UTILS_PACKAGES} \
|
||||
compiler-libs \
|
||||
compiler-libs.optcomp \
|
||||
|
||||
############################################################################
|
||||
## Node program
|
||||
############################################################################
|
||||
|
||||
NODE_LIB_SOURCE_DIRECTORIES := \
|
||||
${COMPILER_SOURCE_DIRECTORIES} \
|
||||
${SRCDIR}/node/db ${SRCDIR}/node/net \
|
||||
${SRCDIR}/node/updater ${SRCDIR}/node/shell \
|
||||
|
||||
NODE_SOURCE_DIRECTORIES := \
|
||||
${NODE_LIB_SOURCE_DIRECTORIES} \
|
||||
${SRCDIR}/node/main
|
||||
|
||||
NODE_OPENED_MODULES := Error_monad Hash Utils Tezos_data
|
||||
|
||||
NODE_LIB_INTFS := \
|
||||
\
|
||||
node/net/p2p_types.mli \
|
||||
node/net/p2p_io_scheduler.mli \
|
||||
node/net/p2p_connection.mli \
|
||||
node/net/p2p_connection_pool_types.mli \
|
||||
node/net/p2p_connection_pool.mli \
|
||||
node/net/p2p_welcome.mli \
|
||||
node/net/p2p_discovery.mli \
|
||||
node/net/p2p_maintenance.mli \
|
||||
node/net/p2p.mli \
|
||||
node/net/RPC_server.mli \
|
||||
\
|
||||
node/db/persist.mli \
|
||||
node/db/context.mli \
|
||||
\
|
||||
node/db/raw_store.mli \
|
||||
node/db/store_helpers.mli \
|
||||
node/db/store.mli \
|
||||
\
|
||||
node/updater/updater.mli \
|
||||
node/updater/register.mli \
|
||||
\
|
||||
node/shell/state.mli \
|
||||
node/shell/distributed_db_functors.mli \
|
||||
node/shell/distributed_db_message.mli \
|
||||
node/shell/distributed_db_metadata.mli \
|
||||
node/shell/distributed_db.mli \
|
||||
node/shell/chain_traversal.mli \
|
||||
node/shell/chain.mli \
|
||||
node/shell/prevalidation.mli \
|
||||
node/shell/prevalidator.mli \
|
||||
node/shell/validator.mli \
|
||||
\
|
||||
node/shell/node_rpc_services.mli \
|
||||
node/shell/node.mli \
|
||||
node/shell/node_rpc.mli \
|
||||
|
||||
NODE_LIB_IMPLS := \
|
||||
\
|
||||
node/net/p2p_types.ml \
|
||||
node/net/p2p_io_scheduler.ml \
|
||||
node/net/p2p_connection.ml \
|
||||
node/net/p2p_connection_pool_types.ml \
|
||||
node/net/p2p_connection_pool.ml \
|
||||
node/net/p2p_welcome.ml \
|
||||
node/net/p2p_discovery.ml \
|
||||
node/net/p2p_maintenance.ml \
|
||||
node/net/p2p.ml \
|
||||
\
|
||||
node/net/RPC_server.ml \
|
||||
\
|
||||
node/db/persist.ml \
|
||||
node/db/context.ml \
|
||||
\
|
||||
node/db/raw_store.ml \
|
||||
node/db/store_sigs.ml \
|
||||
node/db/store_helpers.ml \
|
||||
node/db/store.ml \
|
||||
\
|
||||
node/updater/updater.ml \
|
||||
node/updater/tezos_protocol_environment.ml \
|
||||
node/updater/register.ml \
|
||||
\
|
||||
node/shell/state.ml \
|
||||
node/shell/distributed_db_functors.ml \
|
||||
node/shell/distributed_db_message.ml \
|
||||
node/shell/distributed_db_metadata.ml \
|
||||
node/shell/distributed_db.ml \
|
||||
node/shell/chain_traversal.ml \
|
||||
node/shell/chain.ml \
|
||||
node/shell/prevalidation.ml \
|
||||
node/shell/prevalidator.ml \
|
||||
node/shell/validator.ml \
|
||||
\
|
||||
node/shell/node_rpc_services.ml \
|
||||
node/shell/node.ml \
|
||||
node/shell/node_rpc.ml \
|
||||
|
||||
NODE_INTFS := \
|
||||
node/main/node_identity_file.mli \
|
||||
node/main/node_config_file.mli \
|
||||
node/main/node_shared_arg.mli \
|
||||
node/main/node_run_command.mli \
|
||||
node/main/node_config_command.mli \
|
||||
node/main/node_identity_command.mli \
|
||||
|
||||
NODE_IMPLS := \
|
||||
node/main/node_identity_file.ml \
|
||||
node/main/node_config_file.ml \
|
||||
node/main/node_shared_arg.ml \
|
||||
node/main/node_run_command.ml \
|
||||
node/main/node_config_command.ml \
|
||||
node/main/node_identity_command.ml \
|
||||
node_main.ml \
|
||||
|
||||
NODE_PACKAGES := \
|
||||
$(COMPILER_PACKAGES) \
|
||||
calendar \
|
||||
cmdliner \
|
||||
cohttp.lwt \
|
||||
dynlink \
|
||||
git \
|
||||
irmin-unix \
|
||||
mtime \
|
||||
ocplib-resto.directory \
|
||||
ssl \
|
||||
threads.posix \
|
||||
leveldb \
|
||||
|
||||
EMBEDDED_PROTOCOLS := \
|
||||
$(patsubst ${SRCDIR}/proto/%/TEZOS_PROTOCOL,%, \
|
||||
$(shell ls ${SRCDIR}/proto/*/TEZOS_PROTOCOL))
|
||||
|
||||
EMBEDDED_NODE_PROTOCOLS := \
|
||||
$(patsubst %,${SRCDIR}/proto/tezos_embedded_protocol_%.cmx, ${EMBEDDED_PROTOCOLS})
|
||||
|
||||
############################################################################
|
||||
## Client program
|
||||
############################################################################
|
||||
|
||||
# we do not include 'node/main'
|
||||
CLIENT_SOURCE_DIRECTORIES := \
|
||||
${NODE_LIB_SOURCE_DIRECTORIES} \
|
||||
${SRCDIR}/client ${SRCDIR}/client/embedded
|
||||
|
||||
CLIENT_OPENED_MODULES := Error_monad Hash Utils Tezos_data
|
||||
|
||||
CLIENT_LIB_INTFS := \
|
||||
client/client_rpcs.mli \
|
||||
client/client_node_rpcs.mli \
|
||||
client/client_commands.mli \
|
||||
client/client_generic_rpcs.mli \
|
||||
client/client_helpers.mli \
|
||||
client/client_aliases.mli \
|
||||
client/client_tags.mli \
|
||||
client/client_keys.mli \
|
||||
client/client_protocols.mli \
|
||||
client/client_network.mli \
|
||||
|
||||
CLIENT_LIB_IMPLS := \
|
||||
client/client_rpcs.ml \
|
||||
client/client_node_rpcs.ml \
|
||||
client/client_commands.ml \
|
||||
client/client_config.ml \
|
||||
client/client_generic_rpcs.ml \
|
||||
client/client_helpers.ml \
|
||||
client/client_aliases.ml \
|
||||
client/client_tags.ml \
|
||||
client/client_keys.ml \
|
||||
client/client_protocols.ml \
|
||||
client/client_network.ml \
|
||||
|
||||
CLIENT_IMPLS := \
|
||||
client_main.ml
|
||||
|
||||
CLIENT_PACKAGES := \
|
||||
${NODE_PACKAGES} \
|
||||
magic-mime \
|
||||
|
||||
EMBEDDED_CLIENT_PROTOCOLS := ${EMBEDDED_NODE_PROTOCOLS}
|
||||
|
||||
CLIENT_VERSIONS := \
|
||||
$(patsubst ${SRCDIR}/client/embedded/%/,%, \
|
||||
$(shell ls -d ${SRCDIR}/client/embedded/*/))
|
||||
|
||||
EMBEDDED_CLIENT_VERSIONS := \
|
||||
$(patsubst %,${SRCDIR}/client/embedded/client_embedded_%.cmx, \
|
||||
${CLIENT_VERSIONS})
|
||||
|
||||
|
||||
ALPHA_MODULES := $(addprefix ${SRCDIR}/proto/alpha/, \
|
||||
misc.ml \
|
||||
tezos_hash.ml \
|
||||
\
|
||||
qty_repr.ml \
|
||||
tez_repr.ml \
|
||||
period_repr.ml \
|
||||
time_repr.ml \
|
||||
constants_repr.ml \
|
||||
fitness_repr.ml \
|
||||
raw_level_repr.ml \
|
||||
voting_period_repr.ml \
|
||||
cycle_repr.ml \
|
||||
level_repr.ml \
|
||||
seed_repr.ml \
|
||||
script_int_repr.ml \
|
||||
script_timestamp_repr.ml \
|
||||
script_repr.ml \
|
||||
contract_repr.ml \
|
||||
roll_repr.ml \
|
||||
vote_repr.ml \
|
||||
operation_repr.ml \
|
||||
block_header_repr.ml \
|
||||
\
|
||||
storage_sigs.ml \
|
||||
storage_functors.ml \
|
||||
storage.ml \
|
||||
\
|
||||
level_storage.ml \
|
||||
nonce_storage.ml \
|
||||
seed_storage.ml \
|
||||
roll_storage.ml \
|
||||
contract_storage.ml \
|
||||
reward_storage.ml \
|
||||
bootstrap_storage.ml \
|
||||
fitness_storage.ml \
|
||||
vote_storage.ml \
|
||||
init_storage.ml \
|
||||
public_key_storage.ml \
|
||||
\
|
||||
tezos_context.ml \
|
||||
\
|
||||
script_typed_ir.ml \
|
||||
script_ir_translator.ml \
|
||||
script_interpreter.ml \
|
||||
\
|
||||
mining.ml \
|
||||
amendment.ml \
|
||||
apply.ml \
|
||||
\
|
||||
services.ml \
|
||||
services_registration.ml \
|
||||
main.ml \
|
||||
)
|
@ -1,95 +0,0 @@
|
||||
|
||||
all: \
|
||||
../client_embedded_$(PROTO_VERSION).cmx
|
||||
|
||||
-include ../../../Makefile.local
|
||||
include ../../../Makefile.config
|
||||
|
||||
NODE_DIRECTORIES = \
|
||||
$(addprefix ../../../, \
|
||||
environment \
|
||||
minutils \
|
||||
utils \
|
||||
node/updater \
|
||||
node/db \
|
||||
node/net \
|
||||
node/shell \
|
||||
client \
|
||||
)
|
||||
|
||||
SOURCE_DIRECTORIES += \
|
||||
${NODE_DIRECTORIES} \
|
||||
../../../proto
|
||||
|
||||
OPENED_MODULES := \
|
||||
Error_monad \
|
||||
Hash \
|
||||
Tezos_data
|
||||
|
||||
OBJS := \
|
||||
${CLIENT_IMPLS:.ml=.cmx} ${CLIENT_INTFS:.mli=.cmi}
|
||||
OBJS_DEPS := \
|
||||
${CLIENT_IMPLS:.ml=.ml.deps} ${CLIENT_INTFS:.mli=.mli.deps}
|
||||
|
||||
${OBJS} ${OBJS_DEPS}: TARGET="(client_embedded_$(PROTO_VERSION).cmx)"
|
||||
${OBJS}: EXTRA_OCAMLFLAGS = -for-pack Client_embedded_$(PROTO_VERSION)
|
||||
../client_embedded_$(PROTO_VERSION).cmx: EXTRA_OCAMLFLAGS =
|
||||
${OBJS} ${OBJS_DEPS} ../client_embedded_$(PROTO_VERSION).cmx: \
|
||||
PACKAGES=lwt ocplib-json-typed sodium ocplib-ocamlres uutf ocplib-endian zarith
|
||||
${OBJS} ${OBJS_DEPS} ../client_embedded_$(PROTO_VERSION).cmx: \
|
||||
../../../proto/tezos_embedded_protocol_${PROTO_VERSION}.cmx
|
||||
|
||||
../client_embedded_$(PROTO_VERSION).cmx: $(patsubst %.ml, %.cmx, ${CLIENT_IMPLS})
|
||||
@echo LINK $(notdir $@)
|
||||
@$(OCAMLOPT) -linkall ${OCAMLFLAGS} -pack -o $@ \
|
||||
$(patsubst %.ml, %.cmx, ${CLIENT_IMPLS})
|
||||
|
||||
%.cmx: %.ml
|
||||
@echo OCAMLOPT ${TARGET} $(notdir $@)
|
||||
@$(OCAMLOPT) ${OCAMLFLAGS} -c $<
|
||||
|
||||
%.cmo: %.ml
|
||||
@echo OCAMLC ${TARGET} $(notdir $@)
|
||||
@$(OCAMLC) ${OCAMLFLAGS} -c $<
|
||||
|
||||
%.cmi: %.mli
|
||||
@echo OCAMLOPT ${TARGET} $(notdir $@)
|
||||
@$(OCAMLOPT) ${OCAMLFLAGS} -c $<
|
||||
|
||||
.PHONY: clean
|
||||
clean::
|
||||
-rm -f ../client_embedded_$(PROTO_VERSION).cm* ../client_embedded_$(PROTO_VERSION).o
|
||||
-rm -f *.cm* *~ *.o *.a *.deps *.deps.byte
|
||||
-rm -rf _tzbuild
|
||||
-rm -f .depend
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
include .depend
|
||||
endif
|
||||
|
||||
predepend:
|
||||
|
||||
DEPENDS += \
|
||||
$(patsubst %,%.deps,${CLIENT_INTFS} ${CLIENT_IMPLS})
|
||||
DEPENDS := $(filter-out ${NODEPENDS}, ${DEPENDS})
|
||||
|
||||
.SECONDARY: ${DEPENDS}
|
||||
|
||||
.depend: ${DEPENDS}
|
||||
@cat $^ > .depend
|
||||
|
||||
%.ml.deps: %.ml | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $<)
|
||||
@$(OCAMLDEP) -native $(INCLUDES) ${EXTRA_OCAMLFLAGS} $< > $@
|
||||
|
||||
%.mli.deps: %.mli | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $<)
|
||||
@$(OCAMLDEP) -native $(INCLUDES) ${EXTRA_OCAMLFLAGS} $< > $@
|
||||
|
||||
%.ml.deps.byte: %.ml | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $<)
|
||||
@$(OCAMLDEP) $(INCLUDES) ${EXTRA_OCAMLFLAGS} $< > $@
|
||||
|
||||
%.mli.deps.byte: %.mli | predepend
|
||||
@echo OCAMLDEP ${TARGET} $(notdir $<)
|
||||
@$(OCAMLDEP) $(INCLUDES) ${EXTRA_OCAMLFLAGS} $< > $@
|
@ -1,47 +0,0 @@
|
||||
|
||||
PROTO_VERSION := alpha
|
||||
|
||||
CLIENT_INTFS := \
|
||||
michelson_macros.mli \
|
||||
michelson_parser.mli \
|
||||
client_proto_rpcs.mli \
|
||||
client_proto_args.mli \
|
||||
client_proto_contracts.mli \
|
||||
client_proto_programs.mli \
|
||||
client_proto_context.mli \
|
||||
client_proto_nonces.mli \
|
||||
client_proto_main.mli \
|
||||
client_mining_blocks.mli \
|
||||
client_mining_operations.mli \
|
||||
client_mining_endorsement.mli \
|
||||
client_mining_denunciation.mli \
|
||||
client_mining_revelation.mli \
|
||||
client_mining_forge.mli \
|
||||
client_mining_daemon.mli \
|
||||
client_mining_main.mli \
|
||||
|
||||
CLIENT_IMPLS := \
|
||||
client_proto_alpha.ml \
|
||||
script_located_ir.ml \
|
||||
michelson_macros.ml \
|
||||
michelson_parser.ml \
|
||||
client_proto_rpcs.ml \
|
||||
client_proto_args.ml \
|
||||
client_proto_contracts.ml \
|
||||
client_proto_programs.ml \
|
||||
client_proto_context.ml \
|
||||
client_proto_nonces.ml \
|
||||
client_proto_main.ml \
|
||||
client_mining_blocks.ml \
|
||||
client_mining_operations.ml \
|
||||
client_mining_endorsement.ml \
|
||||
client_mining_denunciation.ml \
|
||||
client_mining_revelation.ml \
|
||||
client_mining_forge.ml \
|
||||
client_mining_daemon.ml \
|
||||
client_mining_main.ml
|
||||
|
||||
include ../Makefile.shared
|
||||
|
||||
${OBJS_DEPS} ${OBJS}: OPENED_MODULES += Client_proto_alpha Tezos_context
|
||||
client_proto_alpha.ml.deps client_proto_alpha.cmx: OPENED_MODULES :=
|
@ -1,16 +0,0 @@
|
||||
|
||||
PROTO_VERSION = demo
|
||||
|
||||
CLIENT_IMPLS = \
|
||||
client_proto_demo.ml \
|
||||
client_proto_rpcs.ml \
|
||||
client_proto_main.ml
|
||||
|
||||
CLIENT_INTFS = \
|
||||
client_proto_rpcs.mli \
|
||||
client_proto_main.mli
|
||||
|
||||
include ../Makefile.shared
|
||||
|
||||
${OBJS_DEPS} ${OBJS}: OPENED_MODULES += Client_proto_demo
|
||||
client_proto_demo.ml.deps client_proto_demo.cmx: OPENED_MODULES :=
|
@ -1,19 +0,0 @@
|
||||
|
||||
PROTO_VERSION = genesis
|
||||
|
||||
CLIENT_IMPLS = \
|
||||
client_proto_genesis.ml \
|
||||
client_proto_main.ml
|
||||
|
||||
CLIENT_INTFS = \
|
||||
client_proto_main.mli
|
||||
|
||||
include ../Makefile.shared
|
||||
|
||||
SOURCE_DIRECTORIES += ..
|
||||
|
||||
${OBJS_DEPS} ${OBJS}: ../client_embedded_alpha.cmx
|
||||
${OBJS_DEPS} ${OBJS}: OPENED_MODULES += Client_proto_genesis
|
||||
client_proto_genesis.ml.deps client_proto_genesis.cmx: OPENED_MODULES :=
|
||||
|
||||
../client_embedded_alpha.cmx:
|
@ -1,36 +0,0 @@
|
||||
|
||||
DIR := \
|
||||
utils \
|
||||
shell \
|
||||
p2p \
|
||||
proto_alpha
|
||||
|
||||
all: build run
|
||||
|
||||
.PHONY: build run test
|
||||
build:
|
||||
${MAKE} -C lib build
|
||||
${MAKE} ${addprefix build-,${DIR}}
|
||||
run:
|
||||
${MAKE} ${addprefix run-,${DIR}}
|
||||
${MAKE} run-basic.sh
|
||||
${MAKE} run-contracts.sh
|
||||
clean:
|
||||
${MAKE} -C lib clean
|
||||
${MAKE} ${addprefix clean-,${DIR}}
|
||||
|
||||
${addprefix build-,${DIR}}: build-%:
|
||||
${MAKE} -C $* build
|
||||
${addprefix run-,${DIR}}: run-%:
|
||||
${MAKE} -C $* run
|
||||
${addprefix clean-,${DIR}}: clean-%:
|
||||
${MAKE} -C $* clean
|
||||
|
||||
run-basic.sh:
|
||||
./test_basic.sh
|
||||
|
||||
run-contracts.sh:
|
||||
./test_contracts.sh
|
||||
|
||||
run-multinode.sh:
|
||||
./test_multinode.sh
|
@ -1,114 +0,0 @@
|
||||
|
||||
ifeq ($(strip ${SRCDIR}),)
|
||||
$(error "Undefined value for $${SRCDIR}")
|
||||
endif
|
||||
|
||||
.PHONY: build run
|
||||
|
||||
all:
|
||||
@${MAKE} --no-print-directory build
|
||||
@${MAKE} --no-print-directory run
|
||||
|
||||
build: ${addprefix test-,${TESTS}}
|
||||
|
||||
run:
|
||||
@$(patsubst %,${MAKE} --no-print-directory run-test-% && , ${TESTS}) \
|
||||
echo && echo "Success" && echo
|
||||
|
||||
############################################################################
|
||||
|
||||
-include ${SRCDIR}/Makefile.local
|
||||
include ${SRCDIR}/Makefile.config
|
||||
include ${SRCDIR}/Makefile.files
|
||||
|
||||
COVERAGESRCDIR=$(patsubst %, -I %, $(SOURCE_DIRECTORIES))
|
||||
|
||||
############################################################################
|
||||
## External packages
|
||||
############################################################################
|
||||
|
||||
TESTLIB := ${SRCDIR}/../test/lib/testlib.cmxa
|
||||
|
||||
${TESTLIB}: $(shell find ${SRCDIR}/../test/lib -name \*.ml -or -name \*.mli)
|
||||
${MAKE} -C ${SRCDIR}/../test/lib testlib.cmxa
|
||||
|
||||
############################################################################
|
||||
## External packages
|
||||
############################################################################
|
||||
|
||||
MINUTILSLIB := ${SRCDIR}/minutils.cmxa
|
||||
UTILSLIB := ${SRCDIR}/utils.cmxa
|
||||
COMPILERLIB := ${SRCDIR}/compiler.cmxa
|
||||
NODELIB := ${SRCDIR}/node.cmxa
|
||||
|
||||
CLIENTLIB := ${SRCDIR}/client.cmxa \
|
||||
$(patsubst ${SRCDIR}/client/embedded/%/, \
|
||||
${SRCDIR}/client/embedded/client_embedded_%.cmx, \
|
||||
$(shell ls -d ${SRCDIR}/client/embedded/*/))
|
||||
|
||||
${MINUTILSLIB} ${UTILSLIB} ${COMPILERLIB} ${NODELIB} ${CLIENTLIB}:
|
||||
${MAKE} -C ${SRCDIR} $@
|
||||
|
||||
${SRCDIR}/minutils/%.cmi: ${SRCDIR}/minutils/%.mli
|
||||
${MAKE} -C ${SRCDIR} minutils.cmxa
|
||||
${SRCDIR}/minutils/%.cmx : ${SRCDIR}/minutils/%.ml
|
||||
${MAKE} -C ${SRCDIR} minutils.cmxa
|
||||
${SRCDIR}/utils/%.cmi: ${SRCDIR}/utils/%.mli
|
||||
${MAKE} -C ${SRCDIR} utils.cmxa
|
||||
${SRCDIR}/utils/%.cmx : ${SRCDIR}/utils/%.ml
|
||||
${MAKE} -C ${SRCDIR} utils.cmxa
|
||||
${SRCDIR}/compiler/%.cmi: ${SRCDIR}/compiler/%.mli
|
||||
${MAKE} -C ${SRCDIR} compiler.cmxa
|
||||
${SRCDIR}/compiler/%.cmx : ${SRCDIR}/compiler/%.ml
|
||||
${MAKE} -C ${SRCDIR} compiler.cmxa
|
||||
${SRCDIR}/node/db/%.cmi: ${SRCDIR}/node/db/%.mli
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/node/db/%.cmx : ${SRCDIR}/node/db/%.ml
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/node/net/%.cmi: ${SRCDIR}/node/net/%.mli
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/node/net/%.cmx : ${SRCDIR}/node/net/%.ml
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/node/shell/%.cmi: ${SRCDIR}/node/shell/%.mli
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/node/shell/%.cmx : ${SRCDIR}/node/shell/%.ml
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/node/updater/%.cmi: ${SRCDIR}/node/updater/%.mli
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/node/updater/%.cmx : ${SRCDIR}/node/updater/%.ml
|
||||
${MAKE} -C ${SRCDIR} node.cmxa
|
||||
${SRCDIR}/client/%.cmi: ${SRCDIR}/client/%.mli
|
||||
${MAKE} -C ${SRCDIR} client.cmxa
|
||||
${SRCDIR}/client/%.cmx : ${SRCDIR}/client/%.ml
|
||||
${MAKE} -C ${SRCDIR} client.cmxa
|
||||
|
||||
############################################################################
|
||||
## Generic rules
|
||||
############################################################################
|
||||
|
||||
%.cmx: %.ml
|
||||
@echo OCAMLOPT ${TARGET} $(notdir $@)
|
||||
@$(OCAMLOPT) ${OCAMLFLAGS} -c $<
|
||||
|
||||
%.cmo: %.ml
|
||||
@echo OCAMLC ${TARGET} $(notdir $@)
|
||||
@$(OCAMLC) ${OCAMLFLAGS} -c $<
|
||||
|
||||
%.cmi: %.mli
|
||||
@echo OCAMLOPT ${TARGET} $(notdir $@)
|
||||
@$(OCAMLOPT) ${OCAMLFLAGS} -c $<
|
||||
|
||||
## Cleaning
|
||||
|
||||
.PHONY: clean partial-clean
|
||||
clean:: partial-clean
|
||||
partial-clean::
|
||||
-find . \( -name \*.cm\* -or -name \*.cmp -or -name \*.out -or -name \*~ -or -name \*.o -or -name \*.a \) -delete
|
||||
|
||||
-include .depend
|
||||
.depend: $(shell find . -name \*.mli -or -name \*.ml)
|
||||
@echo OCAMLDEP "(test/$(notdir $(shell echo $$PWD)))"
|
||||
@$(OCAMLDEP) -native $(INCLUDES) $^ > .depend
|
||||
|
||||
clean::
|
||||
-rm .depend
|
@ -1,32 +0,0 @@
|
||||
|
||||
SRCDIR=../../src
|
||||
|
||||
build: testlib.cmxa
|
||||
|
||||
TESTS :=
|
||||
include ../Makefile.shared
|
||||
|
||||
SOURCE_DIRECTORIES := ${NODE_SOURCE_DIRECTORIES} ../lib
|
||||
|
||||
PACKAGES := \
|
||||
${NODE_PACKAGES} \
|
||||
kaputt \
|
||||
|
||||
OPENED_MODULES := ${NODE_OPENED_MODULES}
|
||||
|
||||
TESTLIB_INTFS := \
|
||||
process.mli \
|
||||
test.mli \
|
||||
assert.mli \
|
||||
node_helpers.mli \
|
||||
|
||||
TESTLIB_IMPLS := \
|
||||
process.ml \
|
||||
test.ml \
|
||||
assert.ml \
|
||||
node_helpers.ml \
|
||||
|
||||
${TESTLIB_IMPLS:.ml=.cmx} ${TESTLIB_INTFS:.mli=.cmi}: TARGET="(testlib.cmxa)"
|
||||
testlib.cmxa: ${TESTLIB_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} ${OCAMLFLAGS} -a -o $@ $^
|
@ -1,77 +0,0 @@
|
||||
|
||||
SRCDIR=../../src
|
||||
|
||||
TESTS := \
|
||||
p2p-connection \
|
||||
p2p-connection-pool \
|
||||
p2p-io-scheduler \
|
||||
|
||||
include ../Makefile.shared
|
||||
|
||||
SOURCE_DIRECTORIES := ${NODE_SOURCE_DIRECTORIES} ../lib
|
||||
|
||||
LIB := ${MINUTILSLIB} ${UTILSLIB} ${COMPILERLIB} ${NODELIB} ${TESTLIB}
|
||||
|
||||
PACKAGES := \
|
||||
${NODE_PACKAGES} \
|
||||
kaputt \
|
||||
|
||||
OPENED_MODULES := ${NODE_OPENED_MODULES}
|
||||
|
||||
############################################################################
|
||||
## P2p_connection
|
||||
|
||||
.PHONY:run-test-p2p-connection
|
||||
run-test-p2p-connection:
|
||||
@echo
|
||||
./test-p2p-connection -v
|
||||
|
||||
TEST_CONNECTION_IMPLS := \
|
||||
test_p2p_connection.ml
|
||||
|
||||
test-p2p-connection: ${LIB} ${TEST_CONNECTION_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-p2p-connection
|
||||
|
||||
############################################################################
|
||||
## P2p_connection_pool
|
||||
|
||||
.PHONY:run-test-p2p-connection-pool
|
||||
run-test-p2p-connection-pool:
|
||||
@echo
|
||||
./test-p2p-connection-pool --clients 10 --repeat 5 -v
|
||||
|
||||
TEST_CONNECTION_POOL_IMPLS := \
|
||||
test_p2p_connection_pool.ml
|
||||
|
||||
test-p2p-connection-pool: ${LIB} ${TEST_CONNECTION_POOL_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-p2p-connection-pool
|
||||
|
||||
############################################################################
|
||||
## P2p_io_scheduler
|
||||
|
||||
.PHONY:run-test-p2p-io-scheduler
|
||||
run-test-p2p-io-scheduler:
|
||||
@echo
|
||||
./test-p2p-io-scheduler \
|
||||
--delay 5 --clients 8 \
|
||||
--max-upload-speed $$((1 << 18)) \
|
||||
--max-download-speed $$((1 << 20))
|
||||
|
||||
TEST_IO_SCHEDULER_IMPLS := \
|
||||
test_p2p_io_scheduler.ml
|
||||
|
||||
test-p2p-io-scheduler: ${LIB} ${TEST_IO_SCHEDULER_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-p2p-io-scheduler
|
||||
|
@ -1,129 +0,0 @@
|
||||
|
||||
SRCDIR=../../src
|
||||
|
||||
TESTS := \
|
||||
transaction \
|
||||
origination \
|
||||
endorsement \
|
||||
vote \
|
||||
|
||||
include ../Makefile.shared
|
||||
|
||||
SOURCE_DIRECTORIES := \
|
||||
${CLIENT_SOURCE_DIRECTORIES} \
|
||||
${SRCDIR}/proto \
|
||||
${SRCDIR}/client/embedded \
|
||||
${SRCDIR}/client/embedded/alpha \
|
||||
../lib
|
||||
|
||||
LIB := \
|
||||
${MINUTILSLIB} ${UTILSLIB} ${COMPILERLIB} \
|
||||
${NODELIB} ${EMBEDDED_CLIENT_PROTOCOLS} ${CLIENTLIB} ${TESTLIB}
|
||||
|
||||
PACKAGES := \
|
||||
${CLIENT_PACKAGES} \
|
||||
kaputt \
|
||||
|
||||
OPENED_MODULES := \
|
||||
${CLIENT_OPENED_MODULES} \
|
||||
Client_embedded_alpha Client_proto_alpha Tezos_context
|
||||
|
||||
${SRCDIR}/client/embedded/alpha/%.cmi: ${SRCDIR}/client/embedded/alpha/%.mli
|
||||
${MAKE} -C ${SRCDIR} client/embedded/client_embedded_alpha.cmx
|
||||
${SRCDIR}/client/embedded/alpha/%.cmx: ${SRCDIR}/client/embedded/alpha/%.ml
|
||||
${MAKE} -C ${SRCDIR} client/embedded/client_embedded_alpha.cmx
|
||||
|
||||
############################################################################
|
||||
## Transactions
|
||||
|
||||
.PHONY:run-test-transaction
|
||||
run-test-transaction:
|
||||
@echo
|
||||
./test-transaction
|
||||
|
||||
TEST_TRANSACTION_IMPLS := \
|
||||
proto_alpha_helpers.ml \
|
||||
test_transaction.ml
|
||||
|
||||
test-transaction: ${LIB} ${TEST_TRANSACTION_IMPLS:.ml=.cmx}
|
||||
@echo COMPILE $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-transaction
|
||||
|
||||
############################################################################
|
||||
## Origination
|
||||
|
||||
.PHONY:run-test-origination
|
||||
run-test-origination:
|
||||
@echo
|
||||
./test-origination
|
||||
|
||||
TEST_ORIGINATION_IMPLS := \
|
||||
proto_alpha_helpers.ml \
|
||||
test_origination.ml
|
||||
|
||||
test-origination: ${LIB} ${TEST_ORIGINATION_IMPLS:.ml=.cmx}
|
||||
@echo COMPILE $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-origination
|
||||
|
||||
############################################################################
|
||||
## Endorsement
|
||||
|
||||
.PHONY:run-test-endorsement
|
||||
run-test-endorsement:
|
||||
@echo
|
||||
./test-endorsement
|
||||
|
||||
TEST_ENDORSEMENT_IMPLS := \
|
||||
proto_alpha_helpers.ml \
|
||||
test_endorsement.ml
|
||||
|
||||
test-endorsement: ${LIB} ${TEST_ENDORSEMENT_IMPLS:.ml=.cmx}
|
||||
@echo COMPILE $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-endorsement
|
||||
|
||||
############################################################################
|
||||
## Vote
|
||||
|
||||
.PHONY:run-test-vote
|
||||
run-test-vote:
|
||||
@echo
|
||||
./test-vote
|
||||
|
||||
TEST_VOTE_IMPLS := \
|
||||
proto_alpha_helpers.ml \
|
||||
test_vote.ml
|
||||
|
||||
test-vote: ${LIB} ${TEST_VOTE_IMPLS:.ml=.cmx}
|
||||
@echo COMPILE $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-vote
|
||||
|
||||
############################################################################
|
||||
## Michelson Parser
|
||||
|
||||
.PHONY: run-test-michelson-parser
|
||||
run-test-michelson-parser:
|
||||
@echo
|
||||
./test-michelson-parser
|
||||
|
||||
TEST_MICHELSON_PARSER_IMPLS := \
|
||||
proto_alpha_helpers.ml \
|
||||
test_michelson_parser.ml
|
||||
|
||||
test-michelson-parser: ${LIB} ${TEST_MICHELSON_PARSER_IMPLS:.ml=.cmx}
|
||||
@echo COMPILE $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-michelson-parser
|
@ -1,74 +0,0 @@
|
||||
|
||||
SRCDIR=../../src
|
||||
|
||||
TESTS := \
|
||||
store \
|
||||
state \
|
||||
context \
|
||||
|
||||
include ../Makefile.shared
|
||||
|
||||
SOURCE_DIRECTORIES := ${NODE_SOURCE_DIRECTORIES} ../lib
|
||||
|
||||
LIB := ${MINUTILSLIB} ${UTILSLIB} ${COMPILERLIB} ${NODELIB} ${EMBEDDED_NODE_PROTOCOLS} ${TESTLIB}
|
||||
|
||||
PACKAGES := \
|
||||
${NODE_PACKAGES} \
|
||||
kaputt \
|
||||
|
||||
OPENED_MODULES := ${NODE_OPENED_MODULES}
|
||||
|
||||
############################################################################
|
||||
## Store
|
||||
|
||||
.PHONY:run-test-store
|
||||
run-test-store:
|
||||
@echo
|
||||
./test-store
|
||||
|
||||
TEST_STORE_IMPLS := \
|
||||
test_store.ml
|
||||
|
||||
test-store: ${LIB} ${TEST_STORE_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-store
|
||||
|
||||
############################################################################
|
||||
## State
|
||||
|
||||
.PHONY:run-test-state
|
||||
run-test-state:
|
||||
@echo
|
||||
./test-state
|
||||
|
||||
TEST_STATE_IMPLS := \
|
||||
test_state.ml
|
||||
|
||||
test-state: ${LIB} ${TEST_STATE_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-state
|
||||
|
||||
############################################################################
|
||||
## Context
|
||||
|
||||
.PHONY:run-test-context
|
||||
run-test-context:
|
||||
@echo
|
||||
./test-context
|
||||
|
||||
TEST_CONTEXT_IMPLS := \
|
||||
test_context.ml
|
||||
|
||||
test-context: ${LIB} ${TEST_CONTEXT_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-context
|
||||
|
@ -1,112 +0,0 @@
|
||||
|
||||
SRCDIR=../../src
|
||||
|
||||
TESTS := \
|
||||
utils \
|
||||
merkle \
|
||||
data-encoding \
|
||||
stream-data-encoding \
|
||||
# lwt-pipe
|
||||
|
||||
include ../Makefile.shared
|
||||
|
||||
SOURCE_DIRECTORIES := ${COMPILER_SOURCE_DIRECTORIES} ../lib
|
||||
|
||||
LIB := ${MINUTILSLIB} ${UTILSLIB} ${TESTLIB}
|
||||
|
||||
PACKAGES := \
|
||||
${UTILS_PACKAGES} \
|
||||
kaputt \
|
||||
|
||||
OPENED_MODULES := ${NODE_OPENED_MODULES}
|
||||
|
||||
############################################################################
|
||||
## Lwt_pipe
|
||||
|
||||
.PHONY:run-test-lwt-pipe
|
||||
run-test-lwt-pipe:
|
||||
@echo
|
||||
./test-lwt-pipe
|
||||
|
||||
TEST_PIPE_IMPLS := \
|
||||
test_lwt_pipe.ml
|
||||
|
||||
test-lwt-pipe: ${LIB} ${TEST_PIPE_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-lwt-pipe
|
||||
|
||||
############################################################################
|
||||
## Merkle
|
||||
|
||||
.PHONY:run-test-merkle
|
||||
run-test-merkle:
|
||||
@echo
|
||||
./test-merkle
|
||||
|
||||
TEST_MERKLE_IMPLS := \
|
||||
test_merkle.ml
|
||||
|
||||
test-merkle: ${LIB} ${TEST_MERKLE_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-merkle
|
||||
|
||||
|
||||
############################################################################
|
||||
## Utils
|
||||
|
||||
.PHONY:run-test-utils
|
||||
run-test-utils:
|
||||
@echo
|
||||
./test-utils
|
||||
|
||||
TEST_UTILS_IMPLS := \
|
||||
test_utils.ml
|
||||
|
||||
test-utils: ${LIB} ${TEST_UTILS_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-utils
|
||||
|
||||
############################################################################
|
||||
## Utils
|
||||
|
||||
.PHONY:run-test-data-encoding
|
||||
run-test-data-encoding:
|
||||
@echo
|
||||
./test-data-encoding
|
||||
|
||||
TEST_DATA_ENCODING_IMPLS := \
|
||||
test_data_encoding.ml
|
||||
|
||||
test-data-encoding: ${LIB} ${TEST_DATA_ENCODING_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-data-encoding
|
||||
|
||||
############################################################################
|
||||
## Streamed data_encoding
|
||||
|
||||
.PHONY:run-test-stream-data-encoding
|
||||
run-test-stream-data-encoding:
|
||||
@echo
|
||||
./test-stream-data-encoding
|
||||
|
||||
TEST_DATA_ENCODING_IMPLS := \
|
||||
test_data_encoding.ml
|
||||
|
||||
test-stream-data-encoding: ${LIB} ${TEST_DATA_ENCODING_IMPLS:.ml=.cmx}
|
||||
@echo LINK $(notdir $@)
|
||||
@${OCAMLOPT} -linkall -linkpkg ${OCAMLFLAGS} -o $@ $^
|
||||
|
||||
clean::
|
||||
rm -f test-stream-data-encoding
|
Loading…
Reference in New Issue
Block a user