CC = gcc
CFLAGS = -O2 -Wall -Wextra -std=c11
LDFLAGS = -lm

all: rsi

rsi: rsi.c
	$(CC) $(CFLAGS) -o $@ rsi.c $(LDFLAGS)

test: rsi
	./test-rsi.sh

bench: rsi
	./bench-rsi.sh

clean:
	rm -f rsi
	# NOTE: bench evidence (bench-rsi/, results-rsi/) is NOT removed by
	# clean — it is the verification record for the numbers in README.md.
	# Use distclean to remove it deliberately.

distclean: clean
	rm -rf bench-rsi results-rsi

.PHONY: all test bench clean distclean
