Makefile 1.33 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
7
8

TYPES  = types/recursive.cmo types/sortedList.cmo \
         types/sortedMap.cmo types/boolean.cmo \
         types/intervals.cmo types/atoms.cmo \
         types/strings.cmo types/types.cmo \
9
         types/patterns.cmo 
10

11
DIRS = parser typing types
12

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

SYNTAX_PARSER = -pp 'camlp4o pa_extend.cmo'
18
19
20
21

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

22
23
compute_depend:
	@echo "Computing dependencies ..."
24
	ocamldep $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) > depend
25

26
run_top: all.cma
27
	ledit ocaml $(INCLUDES) all.cma
28
29
30
31

clean:
	(cd parser; rm -f *.cmi *.cmo *.cma *~)
	(cd types; rm -f *.cmi *.cmo *.cma *~)
32
	(cd typing; rm -f *.cmi *.cmo *.cma *~)
33
34
35
36
37
	rm -f *.cmi *.cmo *.cma *~

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

.ml.cmo:
38
	ocamlc -c $(SYNTAX_PARSER) $(INCLUDES) $<
39
.ml.cmx:
40
	ocamlopt -c $(SYNTAX_PARSER) $(INCLUDES) $<
41
42

.mli.cmi:
43
	ocamlc -c $(INCLUDES) $<
44
45
46
47
48
49
50
51
52

# 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

53
include depend