mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-26 00:28:47 +00:00
Intermediate commit
This commit is contained in:
parent
9e3803ce7b
commit
74341d0f5f
33011 changed files with 92084 additions and 40 deletions
|
|
@ -1,45 +1,13 @@
|
|||
OCAMLC = ocamlc
|
||||
OCAMLOPT = ocamlopt
|
||||
OCAMLDEP = ocamldep
|
||||
SOURCES = common.ml $(TOPFILE).ml
|
||||
LIBS = GT.cma unix.cma re.cma re_emacs.cma re_str.cma
|
||||
CAMLP5 = -pp "camlp5o -I `ocamlfind -query GT.syntax` -I `ocamlfind -query ostap.syntax` pa_ostap.cmo pa_gt.cmo -L `ocamlfind -query GT.syntax`"
|
||||
PXFLAGS = $(CAMLP5)
|
||||
BFLAGS = -rectypes -I `ocamlfind -query GT` -I `ocamlfind -query re` -I `ocamlfind -query ostap` -I ../src
|
||||
OFLAGS = $(BFLAGS)
|
||||
TESTS=test001 test002 test003 test004 test005 test006 test007 test008 test009 test010 test011 test012 test013 test014 test015 test016 test017 test018 test019 test020 test021 test022 test023 test024 test025 test026 test027 test028 test029 test030 test031
|
||||
|
||||
all: .depend $(TOPFILE).opt
|
||||
./$(TOPFILE).opt > $(TOPFILE).log && diff -a --strip-trailing-cr $(TOPFILE).log orig/$(TOPFILE).log
|
||||
.PHONY: check $(TESTS)
|
||||
|
||||
.depend: $(SOURCES)
|
||||
$(OCAMLDEP) $(PXFLAGS) *.ml > .depend
|
||||
check: $(TESTS)
|
||||
|
||||
$(TOPFILE).opt: $(SOURCES:.ml=.cmx)
|
||||
$(OCAMLOPT) -o $(TOPFILE).opt $(OFLAGS) $(LIBS:.cma=.cmxa) ostap.cmx Syntax.cmx Embedding.cmx SM.cmx $(SOURCES:.ml=.cmx)
|
||||
|
||||
$(TOPFILE).byte: $(SOURCES:.ml=.cmo)
|
||||
$(OCAMLC) -o $(TOPFILE).byte $(BFLAGS) $(LIBS) ostap.cmo Syntax.cmo Embedding.cmo SM.cmo $(SOURCES:.ml=.cmo)
|
||||
$(TESTS): %: %.expr
|
||||
../rc.native $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log
|
||||
cat $@.input | ../rc.native -i $< > $@.log && diff $@.log orig/$@.log
|
||||
cat $@.input | ../rc.native -s $< > $@.log && diff $@.log orig/$@.log
|
||||
|
||||
clean:
|
||||
rm -Rf *.cmi *.cmo *.cmx *.annot *.o *.opt *.byte *~ *.log .depend
|
||||
|
||||
-include .depend
|
||||
# generic rules
|
||||
|
||||
###############
|
||||
%.cmi: %.mli
|
||||
$(OCAMLC) -c $(BFLAGS) $(PXFLAGS) $<
|
||||
|
||||
# Note: cmi <- mli should go first
|
||||
%.cmi: %.ml
|
||||
$(OCAMLC) -c $(BFLAGS) $(PXFLAGS) $<
|
||||
|
||||
%.cmo: %.ml
|
||||
$(OCAMLC) -c $(BFLAGS) $(PXFLAGS) $<
|
||||
|
||||
%.o: %.ml
|
||||
$(OCAMLOPT) -c $(OFLAGS) $(STATIC) $(PXFLAGS) $<
|
||||
|
||||
%.cmx: %.ml
|
||||
$(OCAMLOPT) -c $(OFLAGS) $(STATIC) $(PXFLAGS) $<
|
||||
|
||||
rm -f test*.log *.s *~ $(TESTS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue