Makefile 1.52 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/strings.cmo types/types.cmo \
9
         types/patterns.cmo 
10

11
12
13
DRIVER = driver/cduce.cmo

DIRS = parser typing types driver
14

15
OBJECTS = $(TYPES) $(PARSER) $(TYPING)
16
DEPEND = parser/*.ml parser/*.mli typing/*.ml typing/*.mli types/*.ml types/*.mli driver/*.mli driver/*.ml
17
INCLUDES = -I +camlp4 -I parser -I types -I typing
18
19

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

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

24
25
26
cduce: all.cma $(DRIVER)
	ocamlc -o cduce all.cma $(DRIVER)

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

31
run_top: all.cma
32
	ledit ocaml $(INCLUDES) all.cma
33
34
35
36

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

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

.ml.cmo:
45
	ocamlc -c $(SYNTAX_PARSER) $(INCLUDES) $<
46
.ml.cmx:
47
	ocamlopt -c $(SYNTAX_PARSER) $(INCLUDES) $<
48
49

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

# 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

60
include depend