# ZMODEM <-> lrzsz interop harness.
#
#   make run    # build + run (SKIPs if /usr/bin/sz|rz absent)
#   make clean
#
# Compiles the real engine (../../src/zmodem.c) against a host ns/mem shim
# with -DZMODEM_NO_NS, so the on-the-wire code under test is byte-identical
# to the firmware's.
# SPDX-License-Identifier: MIT

CC     ?= cc
SHIM   := shim
ENGINE := ../../src/zmodem.c
CFLAGS := -D_GNU_SOURCE -DZMODEM_NO_NS -I$(SHIM) -I../../src -Wall -O2 -g

interop: interop.c $(ENGINE)
	$(CC) $(CFLAGS) -o $@ interop.c $(ENGINE)

run: interop
	./interop

clean:
	rm -f interop

.PHONY: run clean
