summaryrefslogtreecommitdiff
path: root/Makefile.bad
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2014-04-30 17:19:08 +0200
committerAlex AUVOLAT <alex.auvolat@ens.fr>2014-04-30 17:19:08 +0200
commitbcde99fbe99174a094f38fdda70ad69d65a423f4 (patch)
tree21e16494aba19c4a63d55eba877abfe7fe5d8e80 /Makefile.bad
downloadSemVerif-Projet-bcde99fbe99174a094f38fdda70ad69d65a423f4.tar.gz
SemVerif-Projet-bcde99fbe99174a094f38fdda70ad69d65a423f4.zip
Fist commit (WIP)
Diffstat (limited to 'Makefile.bad')
-rw-r--r--Makefile.bad155
1 files changed, 155 insertions, 0 deletions
diff --git a/Makefile.bad b/Makefile.bad
new file mode 100644
index 0000000..691e0fa
--- /dev/null
+++ b/Makefile.bad
@@ -0,0 +1,155 @@
+# Cours "Sémantique et Application à la Vérification de programmes"
+#
+# Antoine Miné 2014
+# Ecole normale supérieure, Paris, France / CNRS / INRIA
+
+# Makefile
+
+
+# points to compilers
+#
+# (we rely heavily on ocamlfind)
+# (no change needed, the default ones in /usr/bin should be good)
+#
+OCAMLFIND = ocamlfind
+OCAMLLEX = ocamllex
+MENHIR = menhir
+
+
+# options for compilers
+#
+# (change this if you want to enable/disable debugging)
+#
+OCAMLCFLAGS = -g
+OCAMLOPTFLAGS = -g
+OCAMLLEXFLAGS =
+MENHIRFLAGS = --explain
+
+
+# library paths
+#
+# (change this if you add new subdirectories or libraries)
+#
+OCAMLINC = -I frontend -I libs -I corrections -I +zarith
+
+# libraries
+#
+# (change this to add new libraries)
+#
+LIBS = -package zarith
+CMXA =
+CMA =
+
+# name of the compiled executable
+#
+# (change to a better name matching your project)
+#
+TARGET = main
+
+
+# compile either to byte code or native code
+#
+# uncomment only one of the two lines!
+#
+all: $(TARGET).byte
+#all: $(TARGET).opt
+
+
+# list of automatically generated files (by ocamllex and menhir)
+#
+# (this will probably not change during the project)
+#
+AUTOGEN = \
+ frontend/lexer.ml \
+ frontend/parser.ml \
+ frontend/parser.mli
+
+
+# list of ML source files to compile (including automatically generated)
+#
+# add your files here, in the right order!
+#
+MLFILES = \
+ libs/mapext.ml \
+ frontend/abstract_syntax_tree.ml \
+ frontend/abstract_syntax_printer.ml \
+ frontend/parser.ml \
+ frontend/lexer.ml \
+ frontend/file_parser.ml \
+ main.ml
+
+
+# list of MLI source files
+#
+# add your files here
+# (this is only used for ocamldep)
+#
+MLIFILES = \
+ libs/mapext.mli \
+ frontend/parser.mli \
+ frontend/abstract_syntax_printer.mli \
+ frontend/file_parser.mli
+
+
+# below are general compilation rules
+#
+# you probably don't need to change anything below this point
+
+
+# list of object files, derived from ML sources
+#
+CMOFILES = $(MLFILES:%.ml=%.cmo)
+CMXFILES = $(MLFILES:%.ml=%.cmx)
+
+$(TARGET).byte: $(CMOFILES)
+ $(OCAMLFIND) ocamlc -o $@ $(OCAMLCFLAGS) $(OCAMLINC) $(LIBS) $(CMA) -linkpkg $+
+
+# native link
+$(TARGET).opt: $(CMXFILES)
+ $(OCAMLFIND) ocamlopt -o $@ $(OCAMLOPTFLAGS) $(OCAMLINC) $(LIBS) $(CMXA) -linkpkg $+
+
+
+# compilation rules
+
+%.cmo: %.ml %.cmi
+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLINC) $(LIBS) -c $*.ml
+
+%.cmx: %.ml %.cmi
+ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLINC) $(LIBS) -c $*.ml
+
+%.cmi: %.mli
+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLINC) $(LIBS) -c $*.mli
+
+%.cmo: %.ml
+ $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) $(OCAMLINC) $(LIBS) -c $*.ml
+
+%.cmx: %.ml
+ $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) $(OCAMLINC) $(LIBS) -c $*.ml
+
+%.ml: %.mll
+ $(OCAMLLEX) $(OCAMLLEXFLAGS) $*.mll
+
+%.ml %.mli: %.mly
+ $(MENHIR) $(MENHIRFLAGS) $*.mly
+
+
+# remove temporaries and binaries
+#
+clean:
+ rm -f depend $(AUTOGEN) $(TARGET).byte $(TARGET).opt
+ rm -f `find . -name "*.o"`
+ rm -f `find . -name "*.a"`
+ rm -f `find . -name "*.cm*"`
+ rm -f `find . -name "*~"`
+ rm -f `find . -name "\#*"`
+ rm -f `find . -name "*.conflicts"`
+
+.phony: clean
+
+
+# automatic dependencies
+#
+depend: $(MLFILES) $(MLIFILES)
+ -$(OCAMLFIND) ocamldep -native $(OCAMLINC) $+ > depend
+
+include depend