Makefile 1.8 KB
Newer Older
1
2
PARSER = parser/location.cmo parser/ast.cmo parser/parser.cmo

3
TYPING = typing/typed.cmo typing/typer.cmo
4
5
6

TYPES  = types/recursive.cmo types/sortedList.cmo \
         types/sortedMap.cmo types/boolean.cmo \
7
         types/intervals.cmo types/chars.cmo types/atoms.cmo \
8
         types/types.cmo \
9
         types/patterns.cmo \
10
11
	 types/sequence.cmo \
	 types/builtin.cmo
12

13
14
15
DRIVER = driver/cduce.cmo

DIRS = parser typing types driver
16

17
OBJECTS = $(TYPES) $(PARSER) $(TYPING)
18
19
20
XOBJECTS = $(OBJECTS:.cmo=.cmx)
XDRIVER = $(DRIVER:.cmo=.cmx)

21
DEPEND = parser/*.ml parser/*.mli typing/*.ml typing/*.mli types/*.ml types/*.mli driver/*.mli driver/*.ml
22
INCLUDES = -I +camlp4 -I parser -I types -I typing
23
24

SYNTAX_PARSER = -pp 'camlp4o pa_extend.cmo'
25
26

all.cma: $(OBJECTS)
27
	ocamlc -g -o all.cma -I +camlp4 gramlib.cma nums.cma -a $(OBJECTS)
28

29
30
31
32
all.cmxa: $(XOBJECTS)
	ocamlopt -o all.cmxa -I +camlp4 -a $(XOBJECTS)


33
cduce: all.cma $(DRIVER)
34
	ocamlc -g -o cduce all.cma $(DRIVER)
35

36
37
38
cduce.opt: all.cmxa $(XDRIVER)
	ocamlopt -o cduce.opt -I +camlp4 gramlib.cmxa nums.cmxa all.cmxa $(XDRIVER)

39
40
compute_depend:
	@echo "Computing dependencies ..."
41
	ocamldep $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) > depend
42

43
run_top: all.cma
44
	ledit ocaml $(INCLUDES) all.cma
45
46
47
48

clean:
	(cd parser; rm -f *.cmi *.cmo *.cma *~)
	(cd types; rm -f *.cmi *.cmo *.cma *~)
49
	(cd typing; rm -f *.cmi *.cmo *.cma *~)
50
	(cd driver; rm -f *.cmi *.cmo *.cma *~)
51
	rm -f *.cmi *.cmo *.cma *~
52
	rm -f cduce
53
54
55
56

.SUFFIXES: .ml .mli .cmo .cmi .cmx

.ml.cmo:
57
	ocamlc -g -c $(SYNTAX_PARSER) $(INCLUDES) $<
58
.ml.cmx:
59
	ocamlopt -c $(SYNTAX_PARSER) $(INCLUDES) $<
60
61

.mli.cmi:
62
	ocamlc -g -c $(INCLUDES) $<
63
64
65
66
67
68
69
70
71

# FORTPATH = /users/formel8/frisch/solaris/fort/fort
FORTPATH = /home/frisch/fort
FORTBIN = $(FORTPATH)/fort
FORTLIB = $(FORTPATH)

test: all.cma
	$(FORTBIN) -I $(FORTLIB) all.cma test_fort.ml

72
include depend