
all: make_hex ufpb_tool

UFPB_TOOL_OBJECTS = monitor.o srec.o main.o boot_cmds.o ufpb_cmds.o serial.o

CFLAGS = -Wall -O2

make_hex: make_hex.c
	$(CC) $^ -o $@

target.h: make_hex ../target/boot_from_ufpb.bin
	cat ../target/boot_from_ufpb.bin | ./make_hex hms_evb_h8s2633f > $@

ufpb_tool: $(UFPB_TOOL_OBJECTS)
	$(CC) $^ -o $@

clean:
	rm -f $(UFPB_TOOL_OBJECTS) target.h ufpb_tool make_hex

main.c : target.h