improve makefile
This commit is contained in:
parent
e5c1d4708b
commit
656d48a3ed
1 changed files with 35 additions and 3 deletions
38
Makefile
38
Makefile
|
@ -1,6 +1,15 @@
|
|||
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 "\n==== COMPILING ====\n"
|
||||
@echo $(COMPILING)
|
||||
ocamlbuild ftest.native
|
||||
|
||||
format:
|
||||
|
@ -10,11 +19,34 @@ edit:
|
|||
codium . -n
|
||||
|
||||
demo: build
|
||||
@echo "\n==== EXECUTING ====\n"
|
||||
@echo $(EXECUTING)
|
||||
./ftest.native graphs/graph1 1 2 outfile
|
||||
@echo "\n==== RESULT ==== (content of outfile) \n"
|
||||
@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
|
||||
|
|
Loading…
Reference in a new issue