-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·56 lines (40 loc) · 1.17 KB
/
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
52
53
54
55
56
CSLC=ocamlc
CSLOPT=ocamlopt
CSLDEP=ocamldep
CSLLEX=ocamllex
CSLYACC=ocamlyacc
INCLUDES= #all relevant -I options here
CSLFLAGS= $(INCLUDES) #add other options for ocamlc here
CSLOPTFLAGS=$(INCLUDES) #add other options for ocamlopt here
EXAMPLES = examples.hou
objects = liblist.cmo link.cmo term.cmo com.cmo version.cmo pp.cmo par.cmo lex.cmo hou.cmo main.cmo
all: depend term.cmi lex.ml par.ml $(objects) main
# Common rules
.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly
.ml.cmo:
$(CSLC) $(CSLFLAGS) -c $<
.mli.cmi:
$(CSLC) $(CSLFLAGS) -c $<
.ml.cmx:
$(CSLOPT) $(CSLOPTFLAGS) -c $<
.mll.ml:
$(CSLLEX) $(CSLFLAGS) $<
.mly.ml:
$(CSLYACC) $(CSLFLAGS) $<
main:
$(CSLC) -custom -o houves $(CSLFLAGS) unix.cma $(objects) -cclib -lunix
clean:
rm -f houves par.ml houves.tar.gz lex.ml par.ml par.mli *.cm[iox] *~
depend:
$(CSLDEP) $(INCLUDES) *.mli *.ml *.mll *.mly > .depend
par.cmi:
$(CSLC) $(CSLFLAGS) -c par.mli
par.cmi: com.cmi
lex.cmo: par.cmi
par.cmo: par.cmi
include .depend
tar:
tar cvf houves.tar *.ml *.mli *.mll *.mly $(EXAMPLES) .depend README Makefile
gzip houves.tar
publish:
rsync houves.tar.gz README examples.hou distrib/