Makefile 855 B

12345678910111213141516171819202122232425262728293031323334
  1. .PHONY: all clean compile sim sim_gui
  2. all: compile
  3. clean:
  4. rm -fr work
  5. rm -f transcript
  6. rm -f *.wlf
  7. rm -f modelsim.ini
  8. rm -f testgen.o
  9. rm -f testgen
  10. compile:
  11. @vsim -c -do "do scripts/compile.do;quit -f"
  12. sim:
  13. @vsim -c -t ps work.tb -quiet -do "run -all;quit -f" | grep -E "\*\*|Errors"
  14. sim_gui:
  15. @vsim -t ps work.tb -quiet -do "do scripts/wave.do;run -all;wave zoom full"
  16. testgen: testgen.c
  17. gcc -Wall -Wextra -std=c99 -pedantic -g -c testgen.c
  18. gcc -Wall -Wextra -std=c99 -pedantic -g testgen.o -o testgen
  19. ./testgen
  20. cp testdata/default_input.txt testdata/.input.txt
  21. (echo && cat testdata/input.txt) >> testdata/.input.txt
  22. mv testdata/.input.txt testdata/input.txt
  23. cp testdata/default_output.txt testdata/.output.txt
  24. (echo && cat testdata/output.txt) >> testdata/.output.txt
  25. mv testdata/.output.txt testdata/output.txt
  26. .PHONY: testgen