Makefile 383 B

1234567891011121314151617181920212223
  1. PI=pi@raspberrypi.local
  2. SUBDIRS = examples
  3. TARGET = subdirs
  4. PHONY += $(TARGET) $(SUBDIRS) %.clean
  5. OUTDIR = bin
  6. all: $(TARGET)
  7. subdirs: $(SUBDIRS)
  8. $(SUBDIRS):
  9. $(MAKE) -C $@
  10. %.clean:
  11. @(cd $(patsubst %.clean, %, $@) && $(MAKE) clean)
  12. clean distclean: $(patsubst %, %.clean, $(SUBDIRS))
  13. .PHONY: $(PHONY) install clean distclean
  14. upload:
  15. scp $(OUTDIR)/* $(PI):~/