aboutsummaryrefslogtreecommitdiff
path: root/ocaml/Makefile
blob: a46b82afbe7527d8b5e9f8a4327ff90d6ee149c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
STEPS = step0_repl.ml step1_read_print.ml
MODULES = types.ml reader.ml printer.ml
LIBS = str.cma 

BINS = $(STEPS:%.ml=%)

all: $(BINS) mal oc

mal: $(word $(words $(BINS)),$(BINS))
	cp $< $@

$(BINS): %: %.ml $(MODULES)
	ocamlc $(LIBS) $(MODULES) $< -o $@

clean:
	rm -f $(BINS) mal *.cmi *.cmo