Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. all:
  2. @echo "run ether \"make submission_exercise1\" or \"make submission_exercise2\""
  3. submission_exercise1:
  4. @make -C report_exercise1 1>/dev/null
  5. @bash check_files.sh;\
  6. if [ $$? -eq 0 ]; then\
  7. echo "Creating archive ... ";\
  8. tar -cf submission.tar vhdl;\
  9. cd report_exercise1 && tar --append --file=../submission.tar report.pdf && cd .. ;\
  10. gzip -f submission.tar;\
  11. if [ $$(wc -c < submission.tar.gz) -ge 5000000 ]; then\
  12. echo "The archive is too large! You did not clean your Quartus and/or Questa projects! TUWEL will reject it.";\
  13. fi;\
  14. else \
  15. echo "------------------------------------------------------";\
  16. echo "The check had errors --> no archive will be generated!";\
  17. echo "------------------------------------------------------";\
  18. fi;
  19. submission_exercise2:
  20. @make -C report_exercise2 1>/dev/null
  21. @bash check_files.sh ex2;\
  22. if [ $$? -eq 0 ]; then\
  23. echo "Creating archive ... ";\
  24. tar -cf submission.tar vhdl;\
  25. cd report_exercise2 && tar --append --file=../submission.tar report.pdf && cd .. ;\
  26. gzip -f submission.tar;\
  27. if [ $$(wc -c < submission.tar.gz) -ge 5000000 ]; then\
  28. echo "The archive is too large! You did not clean your Quartus and/or Questa projects! TUWEL will reject it.";\
  29. fi;\
  30. else\
  31. echo "------------------------------------------------------";\
  32. echo "The check had errors --> no archive will be generated!";\
  33. echo "------------------------------------------------------";\
  34. fi;
  35. clean:
  36. rm -fr *.tar.gz
  37. .PHONY: clean
  38. .PHONY: submission_exercise1
  39. .PHONY: submission_exercise2