RLWRAPGOALS = login serialdump serialview .PHONY: $(RLWRAPGOALS) BAUDRATE ?= 115200 ifeq ($(HOST_OS),Windows) SERIALDUMP = $(SERIAL_DUMP_BIN) else RLWRAP = $(notdir $(shell which rlwrap)) ifeq ($(RLWRAP),) ifneq ($(filter $(RLWRAPGOALS),$(MAKECMDGOALS)),) $(info Running serialdump without rlwrap support.) $(info Consider installing rlwarp in order to be able to use command history) endif endif SERIALDUMP = $(RLWRAP) $(SERIAL_DUMP_BIN) endif serialdump: $(SERIAL_DUMP_BIN) $(SERIALDUMP) -b$(BAUDRATE) -T $(PORT) | tee serialdump-`date +%Y%m%d-%H%M` serialview: $(SERIAL_DUMP_BIN) $(SERIALDUMP) -b$(BAUDRATE) -T $(PORT) login: $(SERIAL_DUMP_BIN) $(SERIALDUMP) -b$(BAUDRATE) $(PORT)