makefile
784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
OCAMLC=ocamlc
OCAMLOPT=ocamlopt
OCAMLDEP=ocamldep
INCLUDES=-I +xml-light
OCAMLFLAGS=$(INCLUDES) -g
OCAMLOPTFLAGS=$(INCLUDES) unix.cmxa xml-light.cmxa str.cmxa
OCAMLCFLAGS=$(INCLUDES) unix.cma xml-light.cma str.cma
#tu nalezy wpisac wszystkie moduly do skompilowania w kolejnosci zgodnej z zaleznosciami
MODS= NKJPxmlbasics.ml NKJP.mli NKJP.ml
TEST= test.ml
all:
$(OCAMLOPT) -o test $(OCAMLOPTFLAGS) $(MODS) $(TEST)
lib:
$(OCAMLOPT) -linkall -a -o nkjp.cmxa $(INCLUDES) $(MODS)
.SUFFIXES: .mll .mly .ml .mli .cmo .cmi .cmx
.mll.ml:
ocamllex $<
.mly.mli:
ocamlyacc $<
.mly.ml:
ocamlyacc $<
.ml.cmo:
$(OCAMLC) $(OCAMLFLAGS) -c $<
.mli.cmi:
$(OCAMLC) $(OCAMLFALGS) -c $<
.ml.cmx:
$(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
clean:
rm -f *~ *.cm[oix] *.o *.a res*.txt nkjp.cmxa