OCFLAGS=-pp camlp4o prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@ CC=@CC@ CFLAGS=@CPPFLAGS@ @CFLAGS@ -fPIC -Wall -pedantic -Werror -Wno-long-long LIBS=@LIBS@ LDFLAGS=@LDFLAGS@ # -linkall: all users of this library must load all our modules; # in particular, we need sqlite3.cmo to register some exceptions. MKLIBFLAGS=-linkall INSTALL=@INSTALL@ all: bytecode opt docs docs: if [ ! -d doc ]; then mkdir doc; fi ocamldoc -html -d doc sqlite3.mli bytecode: sqlite3.cma sqlite3top opt: sqlite3.cmxa clean: rm -f *.o *.cmo *.cmx *.cmi *.so *.cma *.cmxa *.a sqlite3top distclean: clean rm -rf autom4te.* config.* META Makefile doc # install rebuilds sqlite3top to point to the findlib-managed dll and not the # one in . install: sqlite3.cma sqlite3.cmxa sqlite3top [ -f *.so ] && SO_FILES=*.so; \ ocamlfind install sqlite3 META sqlite3.cmi sqlite3.mli sqlite3.cma *.cmxa *.a *.cmx $$SO_FILES ocamlfind ocamlmktop -o sqlite3top -package "sqlite3" sqlite3.cma $(INSTALL) sqlite3top $(bindir)/sqlite3top remove: uninstall uninstall: ocamlfind remove sqlite3 rm -f $(bindir)/sqlite3top update: sqlite3.cma ocamlfind remove sqlite3 make install sqlite3top: sqlite3.cma ocamlfind ocamlmktop -o sqlite3top sqlite3.cma sqlite3.cma: sqlite3.cmo sqlite3_stubs.o ocamlmklib -o sqlite3 -oc sqlite3_stubs sqlite3.cmo sqlite3_stubs.o -L. $(LDFLAGS) $(LIBS) $(MKLIBFLAGS) sqlite3.cmxa: sqlite3.cmx sqlite3.o sqlite3_stubs.o ocamlmklib -o sqlite3 -oc sqlite3_stubs sqlite3.cmx sqlite3_stubs.o -L. $(LDFLAGS) $(LIBS) $(MKLIBFLAGS) sqlite3.cmo: sqlite3.cmi sqlite3.ml .SUFFIXES: .ml .mli .cmo .cmi .cmx .mli.cmi: ocamlc -w A -warn-error A -c $< .ml.cmo: ocamlc -w A -warn-error A $(OCFLAGS) -c $< .ml.cmx: ocamlc -w A -warn-error A $(OCFLAGS) -c $*.mli ocamlopt -w A -warn-error A -inline 20 $(OCFLAGS) -c $<