TARGET = test
CC = gcc
# The firmware's own emulated EEPROM (driver/eeprom.c) over a flash model
# mapped at the real addresses; stm32f4xx_conf.h, datatypes.h and
# flash_helper.h here stand in for the firmware's
# eeprom.c takes its 32-bit flash addresses as pointers, which a 64-bit host
# warns about; the model is mapped below 4 GB, so they are right
CFLAGS = -O2 -g -Wall -Wextra -Wundef -Wno-int-to-pointer-cast -std=gnu99 -DNO_STM32 -I. -I../../driver -I../../util

$(TARGET): main.c ../../util/conf_stash.c ../../driver/eeprom.c ../../util/crc.c
	$(CC) $(CFLAGS) $^ -o $@

run: $(TARGET)
	./$(TARGET)

clean:
	rm -f $(TARGET)

.PHONY: run clean
