Dépôt du be Ocaml 4IR
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 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. BOLD=\e[1m
  2. BLUE=\e[34m
  3. GREEN=\e[32m
  4. NORMAL=\e[0m
  5. COMPILING="\n$(BOLD)$(BLUE)==== COMPILING ====$(NORMAL)\n"
  6. EXECUTING="\n$(BOLD)$(GREEN)==== EXECUTING ====$(NORMAL)\n"
  7. BUILDING_SVG="\n$(BOLD)$(GREEN)==== BUILDING SVG ====$(NORMAL)\n"
  8. RESULT="\n$(BOLD)$(GREEN)==== RESULT ====$(NORMAL)\n"
  9. build:
  10. @echo $(COMPILING)
  11. ocamlbuild ftest.native
  12. format:
  13. ocp-indent --inplace src/*
  14. test: build
  15. @echo $(EXECUTING)
  16. mkdir -p test
  17. ./ftest.native graphs/graph1
  18. @echo $(BUILDING_SVG)
  19. @echo "graph_init..."
  20. @dot -Tsvg test/graph_init > test/graph_init.svg
  21. @echo "graph_apply..."
  22. @dot -Tsvg test/graph_apply > test/graph_apply.svg
  23. @echo "graph_res..."
  24. @dot -Tsvg test/graph_res > test/graph_res.svg
  25. @echo ""
  26. demo: build
  27. @echo $(EXECUTING)
  28. mkdir -p run
  29. ./ftest.native graphs/test2 0 5 run/solution
  30. @echo $(BUILDING_SVG)
  31. @echo "solution..."
  32. @dot -Tsvg run/solution > run/solution.svg
  33. @echo ""
  34. clean:
  35. -rm -rf _build/
  36. -rm ftest.native
  37. -rm circulationtest.native
  38. -rm -rf run/
  39. -rm -rf test/
  40. build_circulation:
  41. @echo $(COMPILING)
  42. ocamlbuild circulationtest.native
  43. demo_circulation: build_circulation
  44. @echo $(EXECUTING)
  45. ./circulationtest.native circulation_input_graphs/test1 run/circulation_solution
  46. @echo $(BUILDING_SVG)
  47. @echo "circulation_solution..."
  48. @dot -Tsvg run/circulation_solution > run/circulation_solution.svg
  49. @echo ""