No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. default :
  2. @echo "Spécifiez une cible"
  3. ###########################
  4. ### NETTOYAGE ###
  5. ###########################
  6. clean : clean_Symboles clean_Instructions clean_Lex_Yacc clean_Fonctions
  7. @rm -f rondoudou_gcc
  8. @rm -f output.txt
  9. clean_Symboles:
  10. @rm -f Tables/Symboles/*.o
  11. @rm -f Tables/Symboles/test
  12. clean_Instructions:
  13. @rm -f Tables/Instructions/*.o
  14. @rm -f Tables/Instructions/test
  15. clean_Fonctions:
  16. @rm -f Tables/Fonctions/*.o
  17. @rm -f Tables/Fonctions/test
  18. clean_Lex_Yacc:
  19. @rm -f Lex_Yacc/as.output Lex_Yacc/as.tab.* Lex_Yacc/lex.yy.*
  20. ###########################
  21. ### COMPILATION ###
  22. ###########################
  23. build : clean build_Symboles build_Instructions build_Lex_Yacc build_Fonctions
  24. gcc Lex_Yacc/as.tab.o Lex_Yacc/lex.yy.o Tables/Instructions/tab_instruc.o Tables/Symboles/table_symboles.o Tables/Fonctions/tab_fonctions.o -ll -o rondoudou_gcc
  25. build_Symboles: clean_Symboles
  26. gcc -c Tables/Symboles/table_symboles.c -o Tables/Symboles/table_symboles.o
  27. build_Instructions: clean_Instructions
  28. gcc -c Tables/Instructions/tab_instruc.c -o Tables/Instructions/tab_instruc.o
  29. build_Fonctions : clean_Fonctions
  30. gcc -c Tables/Fonctions/tab_fonctions.c -o Tables/Fonctions/tab_fonctions.o
  31. build_Lex_Yacc: clean_Lex_Yacc
  32. bison -g -v -d -t -b Lex_Yacc/as Lex_Yacc/as.y
  33. flex -o Lex_Yacc/lex.yy.c Lex_Yacc/al.lex
  34. gcc -c Lex_Yacc/as.tab.c -o Lex_Yacc/as.tab.o
  35. gcc -c Lex_Yacc/lex.yy.c -o Lex_Yacc/lex.yy.o
  36. ###########################
  37. ### TESTS ###
  38. ###########################
  39. test_Symboles: build_Symboles
  40. gcc -c Tables/Symboles/test.c -o Tables/Symboles/test.o
  41. gcc Tables/Symboles/test.o Tables/Symboles/table_symboles.o -o Tables/Symboles/test
  42. Tables/Symboles/test
  43. test_Instructions: build_Instructions
  44. gcc -c Tables/Instructions/test.c -o Tables/Instructions/test.o
  45. gcc Tables/Instructions/test.o Tables/Instructions/tab_instruc.o -o Tables/Instructions/test
  46. Tables/Instructions/test
  47. test_Fonctions: build_Fonctions
  48. gcc -c Tables/Fonctions/test.c -o Tables/Fonctions/test.o
  49. gcc Tables/Fonctions/test.o Tables/Fonctions/tab_fonctions.o -o Tables/Fonctions/test
  50. Tables/Fonctions/test
  51. test: build
  52. cat Fichiers_Tests/progC | ./rondoudou_gcc
  53. ###########################
  54. ### EDITION ###
  55. ###########################
  56. edit_Lex_Yacc:
  57. pluma Lex_Yacc/al.lex Lex_Yacc/as.y &
  58. edit_Symboles:
  59. pluma Tables/Symboles/table_symboles.c Tables/Symboles/table_symboles.h &
  60. edit_Instructions:
  61. pluma Tables/Instructions/tab_instruc.c Tables/Instructions/tab_instruc.h &
  62. edit_Progs:
  63. pluma Fichiers_Tests/progC &
  64. edit_Fonctions :
  65. pluma Tables/Fonctions/tab_fonctions.c Tables/Fonctions/tab_fonctions.h &
  66. edit: edit_Lex_Yacc edit_Symboles edit_Instructions edit_Progs edit_Fonctions