Makefile 378 B

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