makefile 2.08 KB
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 eniam-morphology.cmxa eniam-subsyntax.cmxa \
	eniam-lcg-parser.cmxa eniam-lcg-lexicon.cmxa \
	eniam-lexSemantics.cmxa #eniam-exec.cmxa
INSTALLDIR=`ocamlc -where`/eniam

SOURCES= ENIAMsemTypes.ml ENIAMexecTypes.ml ENIAMsemLexicon.ml ENIAMsemValence.ml ENIAMdisambiguation.ml ENIAMsemStringOf.ml ENIAMsemGraph.ml ENIAMsemLatexOf.ml ENIAMsemGraphOf.ml ENIAMexec.ml ENIAMselectSent.ml ENIAMvisualization.ml

all: eniam-exec.cma eniam-exec.cmxa

install: all
	mkdir -p $(INSTALLDIR)
	cp eniam-exec.cmxa eniam-exec.a eniam-exec.cma $(INSTALLDIR)
	cp ENIAMexecTypes.cmi ENIAMexec.cmi ENIAMselectSent.cmi ENIAMsemLexicon.cmi ENIAMsemValence.cmi ENIAMdisambiguation.cmi ENIAMsemTypes.cmi ENIAMsemGraph.cmi ENIAMsemStringOf.cmi ENIAMsemLatexOf.cmi ENIAMsemGraphOf.cmi ENIAMvisualization.cmi $(INSTALLDIR)
	cp ENIAMexecTypes.cmx ENIAMexec.cmx ENIAMselectSent.cmx ENIAMsemLexicon.cmx ENIAMsemValence.cmx ENIAMdisambiguation.cmx ENIAMsemTypes.cmx ENIAMsemGraph.cmx ENIAMsemStringOf.cmx ENIAMsemLatexOf.cmx ENIAMsemGraphOf.cmx ENIAMvisualization.cmx $(INSTALLDIR)


eniam-exec.cma: $(SOURCES)
	ocamlc -linkall -a -o eniam-exec.cma $(OCAMLFLAGS) $^

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

parser: $(SOURCES) parser.ml
	$(OCAMLOPT) -o parser $(OCAMLOPTFLAGS) $(SOURCES) parser.ml

semparser: $(SOURCES) semparser.ml
	mkdir -p results
	$(OCAMLOPT) -o semparser $(OCAMLOPTFLAGS) $(SOURCES) semparser.ml

webInterface: $(SOURCES) webInterface.ml
	$(OCAMLOPT) -o parser3.cgi $(OCAMLOPTFLAGS) $(SOURCES) webInterface.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 parser semparser parser3.cgi