Makefile 581 B

1234567891011121314151617181920212223242526272829303132333435
  1. SUBDIRS := tools rv32 fpga
  2. REVISIONS := v1 v2
  3. all clean spotless :
  4. $(MAKE) local.$@ $(SUBDIRS) goal=$@
  5. prefpga:
  6. $(MAKE) local.all $(filter-out fpga,$(SUBDIRS)) goal=all
  7. $(REVISIONS): prefpga
  8. $(MAKE) -C fpga $@
  9. .PHONY: $(SUBDIRS)
  10. $(SUBDIRS):
  11. $(MAKE) -C $@ $(goal)
  12. rv32: tools
  13. fpga: rv32
  14. local.all:
  15. local.clean:
  16. rm -f *~ ./\#* \# *.bak
  17. local.spotless: local.clean
  18. # Obsolete target, need version
  19. program flash:
  20. @echo 'Please specify one of: $(foreach rev,$(REVISIONS),$@-$(rev))' 1>&2
  21. @false
  22. # FPGA-specific targets
  23. program-% flash-%: prefpga
  24. $(MAKE) -C fpga $@