sqlite3-ocaml / Makefile.in

OCFLAGS=-pp camlp4o


CFLAGS=@CPPFLAGS@ @CFLAGS@ -fPIC -Wall -pedantic -Werror -Wno-long-long

# -linkall: all users of this library must load all our modules;
# in particular, we need sqlite3.cmo to register some exceptions.


all: bytecode opt docs

	if [ ! -d doc ]; then mkdir doc; fi
	ocamldoc -html -d doc sqlite3.mli

bytecode: sqlite3.cma sqlite3top

opt: sqlite3.cmxa

	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
	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

	ocamlc -w A -warn-error A -c $<
	ocamlc -w A -warn-error A $(OCFLAGS) -c $<
	ocamlc -w A -warn-error A $(OCFLAGS) -c $*.mli
	ocamlopt -w A -warn-error A -inline 20 $(OCFLAGS) -c $<
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.