# Host test for the MAX17048 fuel gauge's register arithmetic
# (main/drivers/max17048.h).
#
#   nix develop --command sh -c 'cd tests/max17048 && make && ./test_max17048'

CFLAGS += -O1 -g -std=c11 -Wall -Wextra
SAN ?= -fsanitize=address,undefined -fno-omit-frame-pointer

all: test_max17048

test_max17048: test_max17048.c ../../main/drivers/max17048.h
	$(CC) $(CFLAGS) $(SAN) -I../../main/drivers -o $@ test_max17048.c -lm

clean:
	rm -f test_max17048

.PHONY: all clean
