all: $(SOURCES:%.lua=%.up) ifeq ($H,) MYDIR = $(dir $(lastword $(MAKEFILE_LIST))) UPLOAD = python $(MYDIR)/../nodemcu-uploader/nodemcu-uploader.py upload $<:$(notdir $<) else UPLOAD = curl http://$H/upload/$(notdir $<) --data-binary @$< endif %.up: %.lua $(UPLOAD) touch $@ .PHONY: salon chambre salon chambre: %: $(MAKE) -C $@ serial: rlwrap serial -c /dev/ttyUSB0