Makefile 1.54 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
10
         types/patterns.cmo \
	 types/sequence.cmo
11

12
13
14
DRIVER = driver/cduce.cmo

DIRS = parser typing types driver
15

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

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

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

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

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

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

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

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

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

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

# 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

61
include depend