Implement balanced binary tree and refactor
[tiger.ml.git] / exercises / ch01 / Makefile
... / ...
CommitLineData
1MAKEFLAGS := --no-builtin-rules
2
3OCAMLC_OPTIONS := -w A -warn-error A
4OCAMLC_BYTE := ocamlc.opt $(OCAMLC_OPTIONS)
5
6EXECUTABLES := \
7 straight_line_program_interpreter \
8 tree_demo
9EXECUTABLES := $(addsuffix .byte,$(EXECUTABLES))
10
11SET_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
22all:
23 $(MAKE) clean
24 $(MAKE) build
25 $(MAKE) demos
26
27clean:
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
33build:
34 ocamlbuild $(EXECUTABLES)
35
36demos: \
37 run_straight_line_program_interpreter \
38 tree_demo_unbalanced.png \
39 tree_demo_balanced.png
40
41run_straight_line_program_interpreter: straight_line_program_interpreter.byte
42 ./$<
43
44tree_demo_unbalanced.dot: tree_demo.byte
45 ./$< unbalanced $(SET_MEMBERS) > $@
46
47tree_demo_unbalanced.png: tree_demo_unbalanced.dot
48 neato -T png $< > $@
49
50tree_demo_balanced.dot: tree_demo.byte
51 ./$< balanced $(SET_MEMBERS) > $@
52
53tree_demo_balanced.png: tree_demo_balanced.dot
54 neato -T png $< > $@
This page took 0.024026 seconds and 4 git commands to generate.