forked from colinbenner/ocaml-llvm
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
51 lines (35 loc) · 833 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# The lexer generator
CAMLC=../boot/cslrun ../boot/cslc -I ../boot
COMPFLAGS=
LINKFLAGS=
CAMLYACC=../boot/cslyacc
YACCFLAGS=
CAMLLEX=../boot/cslrun ../boot/csllex
CAMLDEP=../boot/cslrun ../tools/csldep
DEPFLAGS=
OBJS=syntax.cmo parser.cmo lexer.cmo lexgen.cmo output.cmo main.cmo
all: csllex
csllex: $(OBJS)
$(CAMLC) $(LINKFLAGS) -o csllex $(OBJS)
clean::
rm -f csllex
rm -f *.cmo *.cmi csllex
parser.ml parser.mli: parser.mly
$(CAMLYACC) $(YACCFLAGS) parser.mly
clean::
rm -f parser.ml parser.mli
beforedepend:: parser.ml parser.mli
lexer.ml: lexer.mll
$(CAMLLEX) lexer.mll
clean::
rm -f lexer.ml
beforedepend:: lexer.ml
.SUFFIXES:
.SUFFIXES: .ml .cmo .mli .cmi
.ml.cmo:
$(CAMLC) -c $(COMPFLAGS) $<
.mli.cmi:
$(CAMLC) -c $(COMPFLAGS) $<
depend: beforedepend
$(CAMLDEP) *.mli *.ml > .depend
include .depend