Makefile 1.56 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
DEPEND = parser/*.ml parser/*.mli typing/*.ml typing/*.mli types/*.ml types/*.mli driver/*.mli driver/*.ml
19
INCLUDES = -I +camlp4 -I parser -I types -I typing
20
21

SYNTAX_PARSER = -pp 'camlp4o pa_extend.cmo'
22
23

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

26
cduce: all.cma $(DRIVER)
27
	ocamlc -g -o cduce all.cma $(DRIVER)
28

29
30
compute_depend:
	@echo "Computing dependencies ..."
31
	ocamldep $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) > depend
32

33
run_top: all.cma
34
	ledit ocaml $(INCLUDES) all.cma
35
36
37
38

clean:
	(cd parser; rm -f *.cmi *.cmo *.cma *~)
	(cd types; rm -f *.cmi *.cmo *.cma *~)
39
	(cd typing; rm -f *.cmi *.cmo *.cma *~)
40
	(cd driver; rm -f *.cmi *.cmo *.cma *~)
41
	rm -f *.cmi *.cmo *.cma *~
42
	rm -f cduce
43
44
45
46

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

.ml.cmo:
47
	ocamlc -g -c $(SYNTAX_PARSER) $(INCLUDES) $<
48
.ml.cmx:
49
	ocamlopt -g -c $(SYNTAX_PARSER) $(INCLUDES) $<
50
51

.mli.cmi:
52
	ocamlc -g -c $(INCLUDES) $<
53
54
55
56
57
58
59
60
61

# 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

62
include depend