Files
fz-lang/Makefile
T

30 lines
711 B
Makefile

.PHONY: build debug-c debug-vm test bench
BENCH_FILE ?= benchmarks/loop.fzs
RUNS ?= 7
WARMUP ?= 2
MAX_ITER ?= 2000000
build:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
build-release:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
debug-c: build
gdb --args ./build/fzc ${FILE}
debug-vm: build
gdb --args ./build/fz ${FILE}
test: build
ctest --output-on-failure --test-dir build
# Compile the benchmark once, then measure only VM process execution.
bench: build-release
./build/fzc -o build/benchmark.fzb $(BENCH_FILE)
python3 scripts/benchmark.py --runs $(RUNS) --warmup $(WARMUP) \
--max-iter $(MAX_ITER) --vm ./build/fz --program build/benchmark.fzb