52 lines
1 KiB
Makefile
52 lines
1 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 outfile
|
|
@echo $(RESULT)
|
|
@cat outfile
|
|
|
|
test: build
|
|
@echo $(EXECUTING)
|
|
./ftest.native graphs/graph1 1 2 outfile
|
|
@echo $(BUILDING_SVG)
|
|
@echo "outfile..."
|
|
@dot -Tsvg outfile > outfile.svg
|
|
@echo "graph_init..."
|
|
@dot -Tsvg graph_init > graph_init.svg
|
|
@echo "graph_apply..."
|
|
@dot -Tsvg graph_apply > graph_apply.svg
|
|
@echo "graph_res..."
|
|
@dot -Tsvg graph_res > graph_res.svg
|
|
@echo ""
|
|
|
|
run: build
|
|
@echo $(EXECUTING)
|
|
./ftest.native graphs/test1 0 3 solution
|
|
@echo $(BUILDING_SVG)
|
|
@echo "solution..."
|
|
@dot -Tsvg solution > solution.svg
|
|
@echo ""
|
|
|
|
|
|
clean:
|
|
-rm -rf _build/
|
|
-rm ftest.native
|