Leave DOT output on disk
[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 := \
f76c63f8
SK
7 straight_line_program_interpreter \
8 tree
e6273b7a 9
b743073d
SK
10.PHONY: build clean demo_unbalanced
11
12build : $(EXECUTABLES)
13
e6273b7a
SK
14%: %.ml %.cmo %.cmi
15 $(OCAMLC_BYTE) -o $@ $*.cmo
16
17%.cmi: %.mli
18 $(OCAMLC_BYTE) -o $@ -c $<
19
20%.cmo: %.ml %.cmi
21 $(OCAMLC_BYTE) -c $<
22
23clean:
06d3ef4a 24 rm -f $(EXECUTABLES) tree.dot # There's also tree.png, but I'm keeping it.
564eb9f3 25
06d3ef4a
SK
26tree.dot: tree
27 ./tree 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 lkhjlk gfjyfjf fdtrdchfhtr trhfgfch hjlilijhl iygkyugkgkhy > tree.dot
28
29tree.png: tree.dot
30 neato -T png tree.dot > tree.png
564eb9f3
SK
31
32demo_unbalanced: tree.png
33 sxiv ./tree.png
This page took 0.019875 seconds and 4 git commands to generate.