##########################################################################
#                                                                        #
#  This file is part of WP plug-in of Frama-C.                           #
#                                                                        #
#  Copyright (C) 2007-2015                                               #
#    CEA (Commissariat a l'energie atomique et aux energies              #
#         alternatives)                                                  #
#                                                                        #
#  you can redistribute it and/or modify it under the terms of the GNU   #
#  Lesser General Public License as published by the Free Software       #
#  Foundation, version 2.1.                                              #
#                                                                        #
#  It is distributed in the hope that it will be useful,                 #
#  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
#  GNU Lesser General Public License for more details.                   #
#                                                                        #
#  See the GNU Lesser General Public License version 2.1                 #
#  for more details (enclosed in the file licenses/LGPLv2.1).            #
#                                                                        #
##########################################################################

help:
	@cat README.txt

depend:
	$(OCAMLDEP) $(INCLUDES) *.ml *.mli *.mll *.mly > .depend

clean::
	rm -f *~ *.cmi *.cmo *.cma *.cmx *.o *.a *.so *.cmxa

.SUFFIXES: .ml .mli .mll .mly .cmo .cmi .cmx

.ml.cmo:
	$(OCAMLC) $(OPTML) $(OPTCMO) -c $(INCLUDES) $<

.mli.cmi:
	$(OCAMLC) $(OPTML) $(OPTCMI) -c $(INCLUDES) $<

.ml.cmx:
	$(OCAMLOPT) $(OPTML) $(OPTCMX) -c $(INCLUDES) $<

.mll.ml:
	@rm -f $@
	$(OCAMLLEX) $<
	@chmod a-w $@

.mly.ml:
	$(OCAMLYACC) $<

sinclude .depend

#######################################################

OPTC?=.opt
OCAMLC?=$(OCAMLROOT)ocamlc$(OPTC)
OCAMLOPT?=$(OCAMLROOT)ocamlopt$(OPTC)
OCAMLLEX?=$(OCAMLROOT)ocamllex
OCAMLYACC?=$(OCAMLROOT)ocamlyacc
OCAMLDOC?=$(OCAMLROOT)ocamldoc$(OPTC)
OCAMLDEP?=$(OCAMLROOT)ocamldep
OCAMLMKLIB?=$(OCAMLROOT)ocamlmklib

#######################################################
