include ./tests.mk LLVM ?= 0 CROSS_COMPILE := COMPILER != [ "$(LLVM)" != "0" ] \ && echo clang --target="$(CROSS_COMPILE)" \ || echo $(CROSS_COMPILE)gcc CFLAGS := -Wall -Wextra -O0 -g INCLUDE_FLAGS := -I include COMPILE_JIT_TEST := $(COMPILER) $(CFLAGS) $(INCLUDE_FLAGS) COMPILE_BCODE_TEST := $(COMPILER) $(CFLAGS) $(INCLUDE_FLAGS) -DFORCE_BCODE=1 .PHONY: check check: $(BCODE_TESTS) $(JIT_TESTS) echo "Success!" .PHONY: check-bcode check-bcode: @echo "Running bytecode tests..." @set -e; for test in $(BCODE_TESTS); do \ echo "Testing: $$test"; \ ./$$test; \ done .PHONY: check-jit check-jit: @echo "Running jit tests..." @set -e; for test in $(JIT_TESTS); do \ echo "Testing: $$test"; \ ./$$test; \ done