63 lines
No EOL
1.4 KiB
Makefile
63 lines
No EOL
1.4 KiB
Makefile
BOLD=\e[1m
|
|
BLUE=\e[34m
|
|
GREEN=\e[32m
|
|
NORMAL=\e[0m
|
|
|
|
COMPILING="\n$(BOLD)$(BLUE)==== COMPILING ====$(NORMAL)\n"
|
|
EXECUTING="\n$(BOLD)$(GREEN)==== EXECUTING ====$(NORMAL)\n"
|
|
BUILDING_SVG="\n$(BOLD)$(GREEN)==== BUILDING SVG ====$(NORMAL)\n"
|
|
RESULT="\n$(BOLD)$(GREEN)==== RESULT ====$(NORMAL)\n"
|
|
|
|
build:
|
|
@echo $(COMPILING)
|
|
ocamlbuild ftest.native
|
|
|
|
format:
|
|
ocp-indent --inplace src/*
|
|
|
|
edit:
|
|
codium . -n
|
|
|
|
demo: build
|
|
@echo $(EXECUTING)
|
|
./ftest.native graphs/graph1 1 2 test/outfile
|
|
@echo $(RESULT)
|
|
@cat test/outfile
|
|
|
|
test: build
|
|
@echo $(EXECUTING)
|
|
./ftest.native graphs/graph1 1 2 test/outfile
|
|
@echo $(BUILDING_SVG)
|
|
@echo "outfile..."
|
|
@dot -Tsvg test/outfile > test/outfile.svg
|
|
@echo "graph_init..."
|
|
@dot -Tsvg test/graph_init > test/graph_init.svg
|
|
@echo "graph_apply..."
|
|
@dot -Tsvg test/graph_apply > test/graph_apply.svg
|
|
@echo "graph_res..."
|
|
@dot -Tsvg test/graph_res > test/graph_res.svg
|
|
@echo ""
|
|
|
|
run: build
|
|
@echo $(EXECUTING)
|
|
./ftest.native graphs/test2 0 5 run/solution
|
|
@echo $(BUILDING_SVG)
|
|
@echo "solution..."
|
|
@dot -Tsvg run/solution > run/solution.svg
|
|
@echo ""
|
|
|
|
|
|
clean:
|
|
-rm -rf _build/
|
|
-rm ftest.native
|
|
|
|
build_circulation:
|
|
@echo $(COMPILING)
|
|
ocamlbuild circulationtest.native
|
|
|
|
run_circulation: build_circulation
|
|
@echo $(EXECUTING)
|
|
./circulationtest.native circulation_input_graphs/test1 run/circulation_solution
|
|
@echo $(BUILDING_SVG)
|
|
@echo "solution..."
|
|
@dot -Tsvg run/circulation_solution > run/circulation_solution.svg
|