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