File: Makefile

package info (click to toggle)
js-of-ocaml 6.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (24 lines) | stat: -rw-r--r-- 701 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: bench perform

export NAME=Camlboy

SHELL=/bin/bash -o pipefail

DIR=CAMLBOY
SCRIPT=$(DIR)/_build/default/bin/web/bench_node.bc
ROM=$(DIR)/resource/games/tobu.gb

bench:
	@date -u +"%FT%TZ - $(NAME): starting"
	git clone --depth 1 https://github.com/ocaml-wasm/CAMLBOY -b node
	cd $(DIR) && opam exec -- dune build --root . --profile release ./bin/web
	@date -u +"%FT%TZ - $(NAME): compiled"
	$(MAKE) perform COMPILER=Js_of_ocaml SUFFIX=.js KIND=js
	$(MAKE) perform COMPILER=Wasm_of_ocaml SUFFIX=.wasm.js KIND=wasm
	@date -u +"%FT%TZ - $(NAME): done"

perform:
	node $(SCRIPT)$(SUFFIX) $(ROM) | \
	tee /dev/stderr | \
	ocaml output_results.ml $(COMPILER) | \
	sh ../utils/aggregate.sh $(KIND)