Makefile 1.16 KB
Newer Older
1
PARSER = parser/location.cmo
2
3
4
5
6
7
8
9

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 \
         types/patterns.cmo types/syntax.cmo

DIRS = parser types
10
11

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

SYNTAX_PARSER = -pp 'camlp4o pa_extend.cmo'
16
17
18
19

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

20
21
22
compute_depend:
	@echo "Computing dependencies ..."
	ocamldep $(SYNTAX_PARSER) $(DEPEND) > depend
23

24
25
run_top: all.cma
	ocaml $(INCLUDES) all.cma
26
27
28
29
30
31
32
33
34

clean:
	(cd parser; rm -f *.cmi *.cmo *.cma *~)
	(cd types; rm -f *.cmi *.cmo *.cma *~)
	rm -f *.cmi *.cmo *.cma *~

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

.ml.cmo:
35
	ocamlc -c $(SYNTAX_PARSER) $(INCLUDES) $<
36
.ml.cmx:
37
	ocamlopt -c $(SYNTAX_PARSER) $(INCLUDES) $<
38
39

.mli.cmi:
40
	ocamlc -c $(INCLUDES) $<
41
42
43
44
45
46
47
48
49

# 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

50
include depend