# Host build of the Tollan embedded host-testable units. No Arduino/ESP toolchain
# needed — the codec (src/TollanProtocol.*) and the forwarder target helpers
# (src/TollanTargets.*) are deliberately dependency-free.
#
#   make        # build + run all
#   make clean
CXX      ?= c++
CXXFLAGS ?= -std=c++17 -Wall -Wextra -O2

.PHONY: all clean
all: test_protocol test_targets
	./test_protocol
	./test_targets

test_protocol: ../../src/TollanProtocol.cpp test_protocol.cpp ../../src/TollanProtocol.h
	$(CXX) $(CXXFLAGS) -o test_protocol ../../src/TollanProtocol.cpp test_protocol.cpp

test_targets: ../../src/TollanTargets.cpp test_targets.cpp ../../src/TollanTargets.h
	$(CXX) $(CXXFLAGS) -o test_targets ../../src/TollanTargets.cpp test_targets.cpp

clean:
	rm -f test_protocol test_targets
