Blame view

tokenizer/makefile 2.16 KB
Wojciech Jaworski authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
OCAMLC=ocamlc
OCAMLOPT=ocamlopt
OCAMLDEP=ocamldep
INCLUDES=-I +xml-light -I +xlib -I +zip -I +bz2 -I +eniam
OCAMLFLAGS=$(INCLUDES) -g
OCAMLOPTFLAGS=$(INCLUDES) unix.cmxa xml-light.cmxa str.cmxa nums.cmxa zip.cmxa bz2.cmxa xlib.cmxa eniam-tokenizer.cmxa
INSTALLDIR=`ocamlc -where`/eniam

SOURCES= ENIAMtokenizerTypes.ml ENIAMtokens.ml ENIAMacronyms.ml ENIAMpatterns.ml ENIAMtokenizer.ml

all: eniam-tokenizer.cma eniam-tokenizer.cmxa

install: all
	mkdir -p $(INSTALLDIR)
Wojciech Jaworski authored
15
	cp eniam-tokenizer.cmxa eniam-tokenizer.a eniam-tokenizer.cma $(INSTALLDIR)
Wojciech Jaworski authored
16
17
	cp ENIAMtokenizerTypes.cmi ENIAMtokens.cmi ENIAMacronyms.cmi ENIAMpatterns.cmi ENIAMtokenizer.cmi $(INSTALLDIR)
	cp ENIAMtokenizerTypes.cmx ENIAMtokens.cmx ENIAMacronyms.cmx ENIAMpatterns.cmx ENIAMtokenizer.cmx $(INSTALLDIR)
Wojciech Jaworski authored
18
19
20
	mkdir -p /usr/share/eniam/tokenizer
	cp resources/mte_20151215.tab  /usr/share/eniam/tokenizer/mte_20151215.tab
	cp resources/README  /usr/share/eniam/tokenizer/README
Wojciech Jaworski authored
21
#	ln -s /usr/share/eniam/tokenizer/mte_20151215.tab /usr/share/eniam/tokenizer/mte.tab
Wojciech Jaworski authored
22
Wojciech Jaworski authored
23
24
25
26
27
28
29
30
install-local: all
	mkdir -p $(INSTALLDIR)
	cp eniam-tokenizer.cmxa eniam-tokenizer.a eniam-tokenizer.cma $(INSTALLDIR)
	cp ENIAMtokenizerTypes.cmi ENIAMtokens.cmi ENIAMacronyms.cmi ENIAMpatterns.cmi ENIAMtokenizer.cmi $(INSTALLDIR)
	cp ENIAMtokenizerTypes.cmx ENIAMtokens.cmx ENIAMacronyms.cmx ENIAMpatterns.cmx ENIAMtokenizer.cmx $(INSTALLDIR)
	mkdir -p /usr/local/share/eniam/tokenizer
	cp resources/mte_20151215.tab  /usr/local/share/eniam/tokenizer/mte_20151215.tab
	cp resources/README  /usr/local/share/eniam/tokenizer/README
Wojciech Jaworski authored
31
#	ln -s /usr/local/share/eniam/tokenizer/mte_20151215.tab /usr/local/share/eniam/tokenizer/mte.tab
Wojciech Jaworski authored
32
Wojciech Jaworski authored
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
eniam-tokenizer.cma: $(SOURCES)
	ocamlc -linkall -a -o eniam-tokenizer.cma $(OCAMLFLAGS) $^

eniam-tokenizer.cmxa: $(SOURCES)
	ocamlopt -linkall -a -o eniam-tokenizer.cmxa $(INCLUDES) $^

test: test.ml
	$(OCAMLOPT) -o test $(OCAMLOPTFLAGS) test.ml

.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[aoix] *.o *.so *.cmxa *.a test