Implement balanced binary tree and refactor
[tiger.ml.git] / exercises / ch01 / Makefile
1 MAKEFLAGS := --no-builtin-rules
2
3 OCAMLC_OPTIONS := -w A -warn-error A
4 OCAMLC_BYTE := ocamlc.opt $(OCAMLC_OPTIONS)
5
6 EXECUTABLES := \
7 straight_line_program_interpreter \
8 tree_demo
9 EXECUTABLES := $(addsuffix .byte,$(EXECUTABLES))
10
11 SET_MEMBERS := \
12 a b c d e f g h i j k l m n o p q r s t u v foo bar kgkvbkvg \
13 lkhjlk gfjyfjf fdtrdchfhtr trhfgfch hjlilijhl iygkyugkgkhy
14
15
16 .PHONY: \
17 all \
18 clean \
19 build \
20 demos
21
22 all:
23 $(MAKE) clean
24 $(MAKE) build
25 $(MAKE) demos
26
27 clean:
28 rm -rf ./_build/
29 rm -f $(EXECUTABLES)
30 # There're also tree demo PNGs, but I want to keep them around, for
31 # referencing without having to build the project.
32
33 build:
34 ocamlbuild $(EXECUTABLES)
35
36 demos: \
37 run_straight_line_program_interpreter \
38 tree_demo_unbalanced.png \
39 tree_demo_balanced.png
40
41 run_straight_line_program_interpreter: straight_line_program_interpreter.byte
42 ./$<
43
44 tree_demo_unbalanced.dot: tree_demo.byte
45 ./$< unbalanced $(SET_MEMBERS) > $@
46
47 tree_demo_unbalanced.png: tree_demo_unbalanced.dot
48 neato -T png $< > $@
49
50 tree_demo_balanced.dot: tree_demo.byte
51 ./$< balanced $(SET_MEMBERS) > $@
52
53 tree_demo_balanced.png: tree_demo_balanced.dot
54 neato -T png $< > $@
This page took 0.058743 seconds and 4 git commands to generate.